CalStoreWeatherCitiesWithinRegionRequest Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | CalStoreWeatherCitiesWithinRegionRequest.h |
Creating
+ requestWithRegion:
Creates a new request for cities withing a specific region
+ (instancetype)requestWithRegion:(MKCoordinateRegion)regionParameters
region |
the region to get cities for |
|---|
Return Value
CalStoreWeatherCitiesWithinRegionRequest that will request cities within the given region
Discussion
Note: this only creates a request, use fetchCitiesWithCompletionHandler: to start requesting the page.
Declared In
CalStoreWeatherCitiesWithinRegionRequest.h
+ requestWithNorthEastCoordinate:southWestCoordinate:
Creates a new request for cities withing a specific rectangle bounded by the northEast and southWest corner
+ (instancetype)requestWithNorthEastCoordinate:(CLLocationCoordinate2D)northEast southWestCoordinate:(CLLocationCoordinate2D)southWestParameters
northEast |
the north-east corner of the region cities should be requested for |
|---|---|
southWest |
the south-west corner of the region cities should be requested for |
Return Value
CalStoreWeatherCitiesWithinRegionRequest that will request cities within the given region
Discussion
Note: this only creates a request, use fetchCitiesWithCompletionHandler: to start requesting the page.
Declared In
CalStoreWeatherCitiesWithinRegionRequest.h
Region
region
The region for which this request will find cities
@property (nonatomic, readonly) MKCoordinateRegion regionDeclared In
CalStoreWeatherCitiesWithinRegionRequest.h
northEastCoordinate
The northEast corner region for which this request will find cities
@property (nonatomic, readonly) CLLocationCoordinate2D northEastCoordinateDiscussion
makes up region together with the southWestCoordinate
Declared In
CalStoreWeatherCitiesWithinRegionRequest.h
southWestCoordinate
The southWest corner region for which this request will find cities
@property (nonatomic, readonly) CLLocationCoordinate2D southWestCoordinateDiscussion
makes up region together with the northEastCoordinate
Declared In
CalStoreWeatherCitiesWithinRegionRequest.h
Authorization
authorizationToken
The AuthorizationToken being used for this request. Defaults to [[CalStoreController sharedController]](../Classes/CalStoreController.html#//api/name/sharedController).authorizationToken.
@property (nonatomic, strong) NSString *authorizationTokenSee Also
Declared In
CalStoreWeatherCitiesWithinRegionRequest.h
Fetching Cities
fetching
YES iff this object is busy fetching cities.
@property (nonatomic, getter=isFetching, readonly) BOOL fetchingDeclared In
CalStoreWeatherCitiesWithinRegionRequest.h
– cancel
Cancels an ongoing request
- (void)cancelDeclared In
CalStoreWeatherCitiesWithinRegionRequest.h
– fetchCitiesWithCompletionHandler:
Fetches the requested cities asynchronously.
- (void)fetchCitiesWithCompletionHandler:(CalStoreWeatherCitiesWithinRegionRequestCompletionHandler)completionHandlerParameters
completionHandler |
block that will be invoked on the main queue if the fetch operation finishes. Check the error parameter of the block to see if the request succeeded. Cities will be returned as an array of CalStoreWeatherCity objects. |
|---|
Declared In
CalStoreWeatherCitiesWithinRegionRequest.h