Sha256: 68e6192789a15cd868cf69ae4479b3633c929cc57884d00a6859b3ed97d8deb4

Contents?: true

Size: 1.35 KB

Versions: 7

Compression:

Stored size: 1.35 KB

Contents

module Songkickr
  # A class to represent the result hash of a Venue search.

  # {"resultsPage":
  #   {"results":
  #     {"venue":
  #       [{"id":17522,
  #         "displayName":"O2 Academy Brixton",
  #         "city":{"uri":"http://www.songkick.com/metro_areas/24426-uk-london",
  #                 "displayName":"London","country":{"displayName":"UK"},"id":24426},
  #         "metroArea":{"uri":"http://www.songkick.com/metro_areas/24426-uk-london",
  #                      "displayName":"London","country":{"displayName":"UK"},"id":24426},
  #         "uri":"http://www.songkick.com/venues/17522-o2-academy-brixton",
  #         "street":"211 Stockwell Road", "zip":"SW9 9SL",
  #         "lat":51.4651268, "lng":-0.115187,
  #         "phone":"020 7771 3000",
  #         "website":"http://www.brixton-academy.co.uk",
  #         "capacity":4921,
  #         "description": "Brixton Academy is an award winning music venue situated in the heart of Brixton, South London."
  #       } ]
  #     },"totalEntries":1,"perPage":50,"page":1,"status":"ok"}}

  class VenueResult < ResultSet
    # Takes the result hash directly and parses out the page and total entries and finally passes off to the parse_results method to get the results.
    def initialize(result_hash = {})
      @result_type       = "Venue"
      @result_key_string = "venue"

      super
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
songkickr-0.5.5 lib/songkickr/venue_result.rb
songkickr-0.5.4 lib/songkickr/venue_result.rb
songkickr-0.5.3 lib/songkickr/venue_result.rb
songkickr-0.5.2 lib/songkickr/venue_result.rb
songkickr-0.5.0 lib/songkickr/venue_result.rb
songkickr-0.4.1 lib/songkickr/venue_result.rb
songkickr-0.4.0 lib/songkickr/venue_result.rb