Inherits from SGItemSet : NSObject
Declared in SGEventSet.h

Overview

SGEventSet provides paginated results of SGEvent items by quering the /events and /recommendations endpoints. SGEventSet extends from SGItemSet, which provides the base result fetching and pagination interface.

SGEventSet *events = SGEventSet.eventsSet;
events.query.search = @"new york mets";

events.onPageLoaded = ^(NSOrderedSet *results) {
    for (SGEvent *event in results) {
        NSLog(@"event: %@", event.title);
    }
};

[events fetchNextPage];

Tasks

Creating a set

Creating a set with a base filter

Class Methods

eventsSet

+ (instancetype)eventsSet
Discussion

Returns a new SGEventSet instance for the /events endpoint. Modify the query to add parameters and filters.

SGEventSet *events = SGEventSet.eventsSet;
events.query.search = @"new york mets";

Declared In

SGEventSet.h

recommendationsSet

+ (instancetype)recommendationsSet
Discussion

Returns a new SGEventSet instance for the /recommendations endpoint. A recommendations query should be seeded with an event or one or more performers.

Events similar to Taylor Swift in New York:

SGEventSet *events = SGEventSet.recommendationsSet;
[events.query addFilter:@"performers.id" value:@(35)];
[events.query addFilter:@"postal_code" value:@(10014)];

Events similar to an event in New York:

SGEventSet *events = SGEventSet.recommendationsSet;
[events.query addFilter:@"events.id" value:@(1162104)];
[events.query addFilter:@"postal_code" value:@(10014)];

Warning: The /recommendations endpoint requires an API key. See SGQuery.clientId for details.

Declared In

SGEventSet.h

setForPerformer:

+ (instancetype)setForPerformer:(SGPerformer *)performer
Discussion

Returns a new SGEventSet instance for the /events endpoint with a performer filter applied.

Declared In

SGEventSet.h

setForVenue:

+ (instancetype)setForVenue:(SGVenue *)venue
Discussion

Returns a new SGEventSet instance for the /events endpoint with a venue filter applied.

Declared In

SGEventSet.h