AWFWeatherEndpointResult
Objective-C
@interface AWFWeatherEndpointResult : NSObject
Swift
class AWFWeatherEndpointResult : NSObject
An AWFWeatherEndpointResult instance is returned by an AWFWeatherEndpoint object upon completion of an API request. The returned instance will contain
an array of results returned by the API for the request, if any, as the respective AWFWeatherObject subclass for that endpoint. Any error that occurred
during the request will also be included with the AWFWeatherEndpointResult instance.
-
The array of
AWFWeatherObjectinstances as parsed from the API response.The returned instances will actually be instances of the respective
AWFWeatherObjectsubclass that corresponds to theAWFWeatherEndpointclass that performed the request.Declaration
Objective-C
@property (nonatomic, strong) AWFWeatherEndpointArrayResultType _Nonnull results;Swift
var results: [AWFWeatherObject] { get set } -
The error, if any, that occurred during the request.
Declaration
Objective-C
@property (nonatomic, strong) NSError *_Nonnull error;Swift
var error: Error { get set } -
Creates and returns an
AWFWeatherEndpointResultinstance initialized with the providedvalueanderror.Declaration
Objective-C
+ (nonnull instancetype)resultWithValue: (nullable AWFWeatherEndpointArrayResultType)value error:(nullable NSError *)error;Swift
convenience init(value: [AWFWeatherObject]?, error: Error?)Parameters
valueThe response value as an array of
AWFWeatherObjectinstances.errorThe error that occurred during the request.
Return Value
An instance initialized with the specified
valueanderror.
View on GitHub
AWFWeatherEndpointResult Class Reference