Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Importing Events from SeatGeek

Stephen Yeargin edited this page Jul 22, 2016 · 4 revisions

Getting Started

Before you begin, ensure that your seed data has been created properly by logging into the /admin route.

SeatGeek import is available on any Entity that has a correctly formatted import_key. For example, this will retrieve all Nashville Predators games that occur at Bridgestone Arena:

https://api.seatgeek.com/2/events?performers.slug=nashville-predators&venue.id=2195

Alternatively, you can request all events where the Nashville Predators are the home team. For events like the Super Bowl or regional NCAA tournaments, this would import events that aren't necessarily part of the season ticket package. If a team plays at multiple home venues during the season, this is the preferred way to import their events.

https://api.seatgeek.com/2/events?performers[home_team].slug=nashville-predators

Any other non-SeatGeek URL for the import_key would be ignored in the import process.

Update Seed Data

The seed data will not contain the correct import key for the majority of entities. Instead, run this to update the records:

$ bundle exec rake seatgeek:update_entities

Batch Import

This command will update events for any active group. It is run nightly in production.

$ bundle exec rake seatgeek:update_events

Manual Import

Browse to a particular Entity record in ActiveAdmin and click one of the two buttons available:

  1. SeatGeek Import -- Creates a new event or updates the start_time, date_tba and time_dba fields.
  2. SeatGeek Import (Overwrite Data) -- Overwrites all fields, including the ``event_nameanddescription` fields.