SeatGeek Client
Introduction
A JavaScript client that serves as an interface layer on top of the SeatGeek API.
It allows fetching genre, performer, taxonomy, venue, and event information.
Installation
npm install seatgeek-client
- NPMJS
Usage
*** ALL ARGUMENTS ARE OPTIONAL UNLESS OTHERWISE SPECIFIED ***
Global Pagination Arguments
perPage
- Represents the number of records to return.
- Default value is 100.
page
- Represents the page to query.
- Default value is 1.
Fetch Genres
; let firstOneHundredGenresFromPage1 = SeatGeekClient;let firstTenGenresFromPage1 = SeatGeekClient;let firstTenGenresFromPage2 = SeatGeekClient;
Fetch Taxonomies
; let firstOneHundredTaxonomiesFromPage1 = SeatGeekClient;let firstTenTaxonomiesFromPage1 = SeatGeekClient;let firstTenTaxonomiesFromPage2 = SeatGeekClient;
Fetch Performers
; // this search will return all performers with// id = 1 OR id = 2 OR id = 3// slug = performer-slug-1 AND slug = performer-slug-2 (which should never happen)// part of the NBA Taxonomy OR the Concert Taxonomy// part of the Pop Genre AND the Classical Genre// search on the response document for jaebaebaelet performersSearch = ids: 1 2 3 slugs: 'performer-slug-1' 'performer-slug-2' taxonomies: TaxonomyNBA TaxonomyCONCERT genres: GenrePOP GenreCLASSICAL queryString: 'jaebaebae' perPage: 4 page: 5; let performers = SeatGeekClient;
Arguments
ids
- An array of performer ids to query for
- An
or
search - Default value is an empty array
slugs
- An array of performer slugs to query for
- An
and
search - Default value is an empty array
taxonomies
- An array of taxonomies to filter from
- An
or
search - Default value is an empty array
genres
- An array of genres to filter from
- An
and
search - Default value is an empty array
queryString
- A string to query against
- Default behavior is an empty string
Fetch Venues
; // this search will return all venues with// id = 1 OR id = 2 OR id = 3// various location information (cityName, stateCode, etc.)// use the ip address as the location to search venues on// use the specified latitude and longitude// only look for venues within a 6 mile radiuslet venuesSearch = ids: 1 2 3 cityName: 'Boston' stateCode: 'MA' countryCode: 'USA' postalCode: '02122' queryString: 'WICKED PISSAH DOOD' useIpAddress: true latitude: 4 longitude: 5 range: 6 unit: UnitMILE perPage: 7 page: 8; let venues = SeatGeekClient;
Arguments
ids
- An array of venue ids to query for
- Default value is an empty array
cityName
- A string representing a city name
- Default value is an empty string
stateCode
- A string representing the ISO state code
- Default value is an empty string
countryCode
- A string representing the ISO country code
- Default value is an empty string
useIpAddress
- A boolean representing whether or not to use the IP address location to search for venues
- Default value is
false
latitude
andlongitude
- Use coordinates to search for venues
- Cannot specify just
latitude
orlongitude
range
- An integer representing the search radius distance
- Default value is
10
unit
- An enum representing the search radius distance unit
- Default value is
Unit.MILE
because fuck you, rest of the world, with your logical unit system.
Fetch Events
; let query = ids: 1 2 3 4 venues: ids: 5 6 7 cityName: 'Boston' stateCode: 'MA' countryCode: 'US' postalCode: '02144' performers: field: PerformerFieldID specificity: PerformerSpecificityANY value: 8 field: PerformerFieldSLUG specificity: PerformerSpecificityPRIMARY value: 'boston-celtics' taxonomies: taxonomy: TaxonomyNBA taxonomy: TaxonomyCONCERTS field: TaxonomyFieldPARENT_ID filters: option: FilterOptionAVERAGE_PRICE operator: OperatorLESS_THAN value: 9 option: FilterOptionLISTING_COUNT operator: OperatorGREATER_THAN_OR_EQUAL_TO value: 10 geolocation: useIpAddress: false latitude: 10 longitude: 11 range: 12 unit: UnitKILOMETER sort: option: SortOptionID direction: SortDirectionASCENDING perPage: 13 page: 14;let events = SeatGeekClient;
Arguments
ids
- An array of event ids to query for
- Default value is an empty array
venues
- An object used to specify venue filtering
ids
- An array of venue ids to query for
- Default value is an empty array
cityName
- A string representing a city name
- Default value is an empty string
stateCode
- A string representing the ISO state code
- Default value is an empty string
countryCode
- A string representing the ISO country code
- Default value is an empty string
useIpAddress
- A boolean representing whether or not to use the IP address location to search for venues
- Default value is
false
latitude
andlongitude
- Use coordinates to search for venues
- Cannot specify just
latitude
orlongitude
range
- An integer representing the search radius distance
- Default value is
10
unit
- An enum representing the search radius distance unit
- Default value is
Unit.MILE
because fuck you, rest of the world, with your logical unit system.