Inherits from NSObject
Declared in SPiDResponse.h
SPiDResponse.m

Overview

SPiDResponse is created for each response from SPiD made by a SPiDRequest

It contains the message as both a object and as raw JSON.

Warning: Received should always check the error property upon receiving a response.

Tasks

Properties

  •   error

    Contains error if there was any, otherwise nil

    property
  •   message

    Received JSON message converted to a dictionary

    property
  •   rawJSON

    Received JSON message as a raw string

    property

Public methods

Properties

error

Contains error if there was any, otherwise nil

@property (strong, nonatomic) NSError *error

Declared In

SPiDResponse.h

message

Received JSON message converted to a dictionary

@property (strong, nonatomic) NSDictionary *message

Declared In

SPiDResponse.h

rawJSON

Received JSON message as a raw string

@property (strong, nonatomic) NSString *rawJSON

Declared In

SPiDResponse.h

Instance Methods

initWithError:

Initializes SPiD response with a error

- (id)initWithError:(NSError *)error

Parameters

error

The received error

Return Value

SPiDAccessToken

Declared In

SPiDResponse.h

initWithJSONData:

Initializes SPiD response with the received message

- (id)initWithJSONData:(NSData *)data

Parameters

data

Data received from SPiD

Return Value

SPiDAccessToken

Declared In

SPiDResponse.h