AWFObservationsLoader Class Reference
Inherits from | AWFGeographicObjectLoader : AWFObjectLoader : NSObject |
---|---|
Declared in | AWFObservationsLoader.h |
Overview
AWFObservationsLoader
provides convenience methods for interacting with the
observations
endpoint of the
Aeris API. In most cases, all requests will return instances of AWFObservation
that will be populated by the data returned by the API unless
otherwise indicated.
– getObservationForPlace:options:completion:
Requests the latest observation for the specified place.
- (void)getObservationForPlace:(AWFPlace *)place options:(AWFRequestOptions *)options completion:(AWFObjectLoaderCompletionBlock)completionBlock
Parameters
place |
The place to request data for. |
---|---|
options |
An |
completionBlock |
The block to be executed on the completion or failure of a request. This block has no return value and takes two arguments:
an array of associated |
Declared In
AWFObservationsLoader.h
– getRecentObservationsForPlace:total:options:completion:
Requests recent observations relative to the current time/date for the specified place. Results will be returned in descending order relative to the current time and date of the place.
- (void)getRecentObservationsForPlace:(AWFPlace *)place total:(NSUInteger)total options:(AWFRequestOptions *)options completion:(AWFObjectLoaderCompletionBlock)completionBlock
Parameters
place |
The place to request data for. |
---|---|
total |
The total number of observations to return. |
options |
An |
completionBlock |
The block to be executed on the completion or failure of a request. This block has no return value and takes two arguments:
an array of associated |
Declared In
AWFObservationsLoader.h
– getArchivedObservationsForPlace:fromDate:toDate:options:completion:
Requests archived observations for the specified place between a starting and ending date. If no ending date is provided, then the current date at the location will be used.
- (void)getArchivedObservationsForPlace:(AWFPlace *)place fromDate:(NSDate *)fromDate toDate:(NSDate *)toDate options:(AWFRequestOptions *)options completion:(AWFObjectLoaderCompletionBlock)completionBlock
Parameters
place |
The place to request data for. |
---|---|
fromDate |
The starting date for the date range to return data for. This date must be a date in the past. |
toDate |
The ending date for the date range to return data for. This date must be a date in the past. If this date is not provided, then the current date for the specified location will be used instead. |
options |
An |
completionBlock |
The block to be executed on the completion or failure of a request. This block has no return value and takes two arguments:
an array of associated |
Declared In
AWFObservationsLoader.h
– getObservationSummaryForPlace:fromDate:toDate:options:completion:
Requests daily observation summaries for the specified place between a starting and ending date. If no ending date is provided, then the current date at the location will be used.
- (void)getObservationSummaryForPlace:(AWFPlace *)place fromDate:(NSDate *)fromDate toDate:(NSDate *)toDate options:(AWFRequestOptions *)options completion:(AWFObjectLoaderCompletionBlock)completionBlock
Parameters
place |
The place to request observation summaries for. |
---|---|
fromDate |
Starting date in the range from which to return data for, which can only be a date in the past. |
toDate |
Ending date in the range to which data is returned for, which can only be a date in the past. |
options |
An |
completionBlock |
The block to be executed on the completion or failure of a request. This block has no return value and takes two arguments:
an array of associated |
Discussion
Warning: Objects returned to the completion block upon a successful request will be instances of AWFObservationSummary
, not AWFObservation
.
Declared In
AWFObservationsLoader.h