A gem for accessing the StubHub API
Add this line to your application's Gemfile:
gem 'stubhub'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stubhub
Examples
# find a ticket by ticket id
Stubhub::Ticket.find_by_ticket_id(487197960) # => returns a Ticket object
# find an event by event id
Stubhub::Event.find_by_event_id(4236091) # => returns an Event object
# find tickets for an specific event
# first find the event
event = Stubhub::Event.find_by_event_id(4236091) # => returns an Event object
# then call tickets method on that event
event.tickets # => returns an array of ticket objects
#return the first 20 ticket listings
event.tickets("row" => 20) # => returns an array of ticket objects
#return the second 20 ticket listings
event.tickets("start" => 20, "row" => 20) # => returns an array of ticket objects
# search for an event
Stubhub::Event.search("swedish house mafia") # => returns an Event object
# search for a venue
Stubhub::Venue.search("Oracle Arena") # => returns a Venue object
# search for a genre
Stubhub::Genre.search("ice show") # => returns a Genre object
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request