Type Definitions

The following type definitions are available globally.

  • A callback to be run with a token response

    Declaration

    Objective-C

    typedef void (^AIQTokenCompletionBlock)(AIQApiAuthToken *_Nullable,
                                            NSError *_Nullable)

    Swift

    typealias AIQTokenCompletionBlock = (AIQApiAuthToken?, Error?) -> Void

    Parameters

    token

    The Auth token from the response. Will be nil if an error occurs.

    error

    The error returned from the response, or nil if none occurs. - see: AIQError.h for possible values.

  • A callback to be run wih a collections response

    Declaration

    Objective-C

    typedef void (^AIQCollectionsCompletionBlock)(NSArray *_Nullable,
                                                  NSError *_Nullable)

    Swift

    typealias AIQCollectionsCompletionBlock = ([Any]?, Error?) -> Void

    Parameters

    result

    Array of collections from the response. Will be nil if an error occurs.

    error

    The error returned from the response, or nil if none occurs. - see: AIQError.h for possible values.

  • A callback to be run with register user

    Declaration

    Objective-C

    typedef void (^AIQUserRequestCompletionBlock)(AIQUserAPIResponse *_Nullable,
                                                  NSError *_Nullable)

    Swift

    typealias AIQUserRequestCompletionBlock = (AIQUserAPIResponse?, Error?) -> Void