Inherits from NSObject
Declared in APHelperMethods.h
APHelperMethods.m

Tasks

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

errorForSessionNotCreated

Helper method used to create an error for the case when a session has not been retrieved and API calls are made.

+ (APError *)errorForSessionNotCreated

Declared In

APHelperMethods.h

jsonDateStringFromDate:

Helper method to parse NSDate to NSString.

+ (NSString *)jsonDateStringFromDate:(NSDate *)date

Parameters

date

NSDate to parse.

Return Value

String from NSDate.

Declared In

APHelperMethods.h