Accela SDK for iOS  V3.0
AMRequest Class Reference

List of all members.

Public Member Functions

(id) - initWithPath:urlParams:httpMethod:
(BOOL) - isLoading
(void) - cancelRequest
(id) - fetchWithData:error:
(AMRequest *) - sendRequestWithData:requestDelegate:
(AMRequest *) - sendRequestWithData:attachments:requestDelegate:
(AMRequest *) - uploadAttachment:requestDelegate:
(AMRequest *) - downloadAttachment:requestDelegate:
(void) - setProgressLabelText:
(void) - waitUntilFinished

Properties

id< AMRequestDelegateamRequestDelegate
NSString * amServiceURL
NSDictionary * amParams
HTTP_METHOD amHttpMethod
long amTimeOutSeconds
AMErrorBlock amErrorBlock
AMDataBlock amCompletionBlock
NSString * amDownloadDestinationPath
NSString * amUploadDestinationPath
UIView * amOwnerView
NSDictionary * userProfile
NSInteger tag

Member Function Documentation

- (void) cancelRequest

Cancels the current request.

Since:
1.0
- (AMRequest *) downloadAttachment: (NSString *)  localFile
requestDelegate: (id<AMRequestDelegate>)  requestDelegate 

Downloads a binary file represented by an AMAttachmentModel object as an asynchronous operation.

Parameters:
localFileThe path for file
requestDelegateA delegate object to inform of the results.
See also:
AMRequestDelegate for information on the delegate protocol.
Returns:
The AMRequest object corresponding to this API call.
Since:
1.0
- (id) fetchWithData: (NSData *)  data
error: (AMErrorBlock)  errorBlock 

Synchronously send a request identified by the Accela Civic Cloud API endpoint with the given data using an HTTP POST method.

Parameters:
dataThe content sent with the coresponding request.
errorBlockAn AMErrorBlock object that will be called when there is an error during the method call.
Returns:
The resulting object is a JSON object, may be a dictionary or an array, if succeed; otherwise, nil.
Since:
1.0
- (id) initWithPath: (NSString *)  servicePath
urlParams: (NSDictionary *)  params
httpMethod: (HTTP_METHOD)  httpMethod 

init AMRequest instance

Parameters:
servicePathThe path to the Accela Civic Cloud API endpoint.
paramsThe collection of parameters associated with the specific URL.
httpMethodThe HTTP data transfer method (such as GET, POST, or DELETE). It is an HTTP GET method by default.
Returns:
The AMRequest object corresponding to this API call.
Since:
1.0
- (BOOL) isLoading

Indicates whether the request is in-progress.

Returns:
YES when this request is in-progress; otherwise, NO.
Since:
1.0
- (id) sendRequestWithData: (NSString *)  data
attachments: (NSDictionary *)  attachments
requestDelegate: (id<AMRequestDelegate>)  requestDelegate 

Makes a HTTP Form request to the Accela Civic Cloud API endpoint with the given data using an HTTP POST method as an asynchronous operation.

Parameters:
dataThe content sent with the coresponding request.
requestDelegateA delegate object to inform of the results.
attachmentsto be upload in the request
See also:
AMRequestDelegate for information on the delegate protocol.
Returns:
The AMRequest object corresponding to this API call.
Since:
2.1.1
- (id) sendRequestWithData: (NSData *)  data
requestDelegate: (id<AMRequestDelegate>)  requestDelegate 

Makes a request to the Accela Civic Cloud API endpoint with the given data using an HTTP POST method as an asynchronous operation.

Parameters:
dataThe content sent with the coresponding request.
requestDelegateA delegate object to inform of the results.
See also:
AMRequestDelegate for information on the delegate protocol.
Returns:
The AMRequest object corresponding to this API call.
Since:
1.0
- (void) setProgressLabelText: (NSString *)  labelText

An optional short message to be displayed below the activity indicator. The progress is automatically resized to fit the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or set to "", then no message is displayed.

Parameters:
labelTexttext message
Since:
1.0
- (AMRequest *) uploadAttachment: (NSDictionary *)  fileInformation
requestDelegate: (id<AMRequestDelegate>)  requestDelegate 

Uploads a binary file represented by an AMAttachmentModel object as an asynchronous operation.

Parameters:
fileInformationA dictionary instance specifies the name of the file as well as the path of it. Note that the key value of the file name should be "fileName" and the key value of the file path should be "localPath".
requestDelegateA delegate object to inform of the results.
See also:
AMRequestDelegate for information on the delegate protocol.
Returns:
The AMRequest object corresponding to this API call.
Since:
1.0

TODO:

Since:
2.0

Property Documentation

- (AMDataBlock) amCompletionBlock [read, write, copy]

Gets or sets the AMDataBlock object that will be called when the request has completed.

Since:
1.0
- (NSString*) amDownloadDestinationPath [read, write, retain]

Gets or sets the path in which the downloading binary file will reside.

Since:
1.0
- (AMErrorBlock) amErrorBlock [read, write, copy]

Gets or sets the AMErrorBlock object that will be called when there is an error during the method call.

Since:
1.0
- (HTTP_METHOD) amHttpMethod [read, write, assign]

Gets or sets the HTTP data transfer method (such as GET, POST, or DELETE) used by this request.

Since:
1.0
- (UIView*) amOwnerView [read, write, assign]

Gets or sets the view object in which the login dialog will be shown.

Since:
1.0
- (NSDictionary*) amParams [read, write, retain]

Gets or sets the collection of parameters associated with the specific URL.

Since:
1.0
- (id<AMRequestDelegate>) amRequestDelegate [read, write, retain]

Gets or sets the delegate that will be called during the request lifecycle.

Since:
1.0
- (NSString*) amServiceURL [read, write, retain]

Gets or sets the Uniform Resource Location (URL) of the Internet resource used when sending requests.

Since:
1.0
- (long) amTimeOutSeconds [read, write, assign]

Gets or sets the number of milliseconds to wait before the request times out.

Since:
1.0
- (NSString*) amUploadDestinationPath [read, write, retain]

Gets or sets the path in which the binary file which will be uploaded reside.

Since:
1.0
- (NSInteger) tag [read, write, assign]

Gets or sets an integer that you can use to identity request objects.

Since:
1.0
- (NSDictionary*) userProfile [read, write, assign]

Gets the profile of the currently logged in user.

Since:
1.0

The documentation for this class was generated from the following files:
 All Classes Functions Properties