Code Monkey home page Code Monkey logo

stubhub's Introduction

Stubhub

A gem for accessing the StubHub API

Installation

Add this line to your application's Gemfile:

gem 'stubhub'

And then execute:

$ bundle

Or install it yourself as:

$ gem install stubhub

Usage

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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

stubhub's People

Contributors

earlonrails avatar jwkellyiii avatar rloomba avatar stevenabrooks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stubhub's Issues

stubhubDocumentType ticket doesn't seem to work anymore

When using the lib I kept getting errors trying to retrieve the tickets for an event. I noticed the url being used

http://www.stubhub.com/listingCatalog/select/?q=%2B+stubhubDocumentType%3Aticket%0D%0A%2B+event_id%3A4404075%0D%0A&start=0&rows=10&wt=json

Would redirect to a stubhub generic error page. I changed the document type to * and it would retrieve documents with a type ticket

http://www.stubhub.com/listingCatalog/select/?q=%2B+stubhubDocumentType%3A*%0D%0A%2B+event_id%3A4404075%0D%0A&start=0&rows=10&wt=json

Dunno if this is a stubhub bug or a bug in your api

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.