APHelperMethods Class Reference
Inherits from | NSObject |
Declared in | APHelperMethods.h APHelperMethods.m |
Tasks
-
+ checkForErrorStatus:
Helper method used to check for any errors.
-
+ errorForSessionNotCreated
Helper method used to create an error for the case when a session has not been retrieved and API calls are made.
-
+ arrayOfPropertiesFromJSONResponse:
Helper method to parse the properties from a json response
-
+ dictionaryOfPropertiesFromJSONResponse:
Helper method to parse the properties from a json response
-
+ deserializeJsonDateString:
Helper method to parse json response to NSDate
-
+ jsonDateStringFromDate:
Helper method to parse NSDate to NSString.
-
+ addHeadersToMKNetworkOperation:
Helper method to add the session id and environment to the request headers.
Class Methods
addHeadersToMKNetworkOperation:
Helper method to add the session id and environment to the request headers.
+ (void)addHeadersToMKNetworkOperation:(MKNetworkOperation *)operation
Parameters
- operation
The operation to add the headers to.
Declared In
APHelperMethods.h
arrayOfPropertiesFromJSONResponse:
Helper method to parse the properties from a json response
+ (NSArray *)arrayOfPropertiesFromJSONResponse:(id)response
Parameters
- response
Response received from the server.
Return Value
An array of properties
Declared In
APHelperMethods.h
checkForErrorStatus:
Helper method used to check for any errors.
+ (APError *)checkForErrorStatus:(id)response
Parameters
- response
Response received from the server.
Declared In
APHelperMethods.h
deserializeJsonDateString:
Helper method to parse json response to NSDate
+ (NSDate *)deserializeJsonDateString:(NSString *)jsonDateString
Parameters
- response
Response received from the server.
Return Value
date date as NSDate object.
Declared In
APHelperMethods.h
dictionaryOfPropertiesFromJSONResponse:
Helper method to parse the properties from a json response
+ (NSMutableDictionary *)dictionaryOfPropertiesFromJSONResponse:(id)response
Parameters
- response
Response received from the server.
Return Value
A dictionary of properties
Declared In
APHelperMethods.h