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
AWFWeatherObject
instances as parsed from the API response.The returned instances will actually be instances of the respective
AWFWeatherObject
subclass that corresponds to theAWFWeatherEndpoint
class 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
AWFWeatherEndpointResult
instance initialized with the providedvalue
anderror
.Declaration
Objective-C
+ (nonnull instancetype)resultWithValue: (nullable AWFWeatherEndpointArrayResultType)value error:(nullable NSError *)error;
Swift
convenience init(value: [AWFWeatherObject]?, error: Error?)
Parameters
value
The response value as an array of
AWFWeatherObject
instances.error
The error that occurred during the request.
Return Value
An instance initialized with the specified
value
anderror
.