Inherits from | SGItemSet : NSObject |
Declared in | SGVenueSet.h |
Overview
SGVenueSet
provides paginated results of SGVenue
items by quering the /venues endpoint. SGVenueSet
extends from SGItemSet, which provides the base result fetching and pagination interface.
SGVenueSet *venues = [SGVenueSet setForCity:@"rockford"];
venues.onPageLoaded = ^(NSOrderedSet *results) {
for (SGVenue *venue in results) {
NSLog(@"venue: %@", venue.name);
}
};
[venues fetchNextPage];
Tasks
Creating a set
-
+ venuesSet
Returns a new
SGVenueSet
instance for the /venues endpoint. Modify the query to add parameters and filters.
Creating a set with a base filter
-
+ setForCity:
Returns a new
SGVenueSet
instance for the /venues endpoint with a city filter applied. -
+ setForState:
Returns a new
SGVenueSet
instance for the /venues endpoint with a state filter applied. -
+ setForCountry:
Returns a new
SGVenueSet
instance for the /venues endpoint with a country filter applied. -
+ setForPostalCode:
Returns a new
SGVenueSet
instance for the /venues endpoint with a postal code filter applied.
Class Methods
setForCity: 
+ (instancetype)setForCity:(NSString *)city
Discussion
Returns a new SGVenueSet
instance for the /venues endpoint with a city filter applied.
SGVenueSet *venues = [SGVenueSet setForCity:@"rockford"];
Declared In
SGVenueSet.h
setForCountry: 
+ (instancetype)setForCountry:(NSString *)country
Discussion
Returns a new SGVenueSet
instance for the /venues endpoint with a country filter applied.
SGVenueSet *venues = [SGVenueSet setForCountry:@"US"];
Declared In
SGVenueSet.h
setForPostalCode: 
+ (instancetype)setForPostalCode:(NSString *)postalCode
Discussion
Returns a new SGVenueSet
instance for the /venues endpoint with a postal code filter applied.
SGVenueSet *venues = [SGVenueSet setForPostalCode:@(90210)];
Declared In
SGVenueSet.h
setForState: 
+ (instancetype)setForState:(NSString *)state
Discussion
Returns a new SGVenueSet
instance for the /venues endpoint with a state filter applied.
SGVenueSet *venues = [SGVenueSet setForState:@"IL"];
Declared In
SGVenueSet.h