NeuraAPIResult Class Reference

Inherits from NSObject
Declared in NeuraAPIResult.h

Overview

NeuraAPIResult Base class for all other API results objects. Used in simple responses that include only errors and/or status field. Success is YES if no error encountered and server responded with status = success

  success

BOOL value indicating success.

@property (nonatomic, readonly) BOOL success

Discussion

BOOL value indicating success.

Declared In

NeuraAPIResult.h

  error

(optional) A NeuraAPIError object if an error encountered. mil otherwise.

@property (nonatomic, nullable, readonly) NeuraAPIError *error

Discussion

(optional) A NeuraAPIError object if an error encountered. mil otherwise.

Declared In

NeuraAPIResult.h

  errorString

(optional) error message if an error encountered. nil otherwise. This is the same as error.localizedDescription.

@property (nonatomic, nullable, readonly) NSString *errorString

Discussion

(optional) error message if an error encountered. nil otherwise. This is the same as error.localizedDescription.

Declared In

NeuraAPIResult.h

+ resultForInfo:errorString:

Instantiate the base api result object.

+ (nonnull instancetype)resultForInfo:(nonnull id)info errorString:(nullable NSString *)errorString

Parameters

info

Information to be parsed. NeuraAPIResult assumes info is NSDictionary. Derived classes may use a different NSObject.

errorString

An error message string.

Return Value

NeuraAPIResult object.

Discussion

Instantiate the base api result object.

Declared In

NeuraAPIResult.h