module Ticketmaster::Client::Discovery

Public Instance Methods

get_attraction(id, options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 38
def get_attraction(id, options={})
  options[:version] ||= 'v2'

  request  = Request.new("discovery/#{options[:version]}/attractions/#{id}", {}, self)
  response = request.get
  Result.create(response, request, 'Ticketmaster::Attraction')
end
get_classification(id, type, options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 55
def get_classification(id, type, options={})
  options[:version] ||= 'v2'

  request  = Request.new("discovery/#{options[:version]}/#{type}/#{id}", {}, self)
  response = request.get
  Result.create(response, request, 'Ticketmaster::Classification')
end
get_event(id, options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 13
def get_event(id, options={})
  options[:version] ||= 'v2'

  request  = Request.new("discovery/#{options[:version]}/events/#{id}", {}, self)
  response = request.get
  Result.create(response, request, 'Ticketmaster::Event')
end
get_event_images(id, options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 21
def get_event_images(id, options={})
  options[:version] ||= 'v2'

  request  = Request.new("discovery/#{options[:version]}/events/#{id}/images", {}, self)
  response = request.get
  Result.array(response['images'], request, 'Ticketmaster::Image')
end
get_legacy_event(id, options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 80
def get_legacy_event(id, options={})
  options[:version] ||= 'v2'

  request  = Request.new("discovery/#{options[:version]}/events/legacy/#{id}", {}, self)
  response = request.get
  Result.create(response, request, 'Ticketmaster::Event')
end
get_venue(id, options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 72
def get_venue(id, options={})
  options[:version] ||= 'v2'

  request  = Request.new("discovery/#{options[:version]}/venues/#{id}", {}, self)
  response = request.get
  Result.create(response, request, 'Ticketmaster::Venue')
end
search_attractions(options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 29
def search_attractions(options={})
  options[:version] ||= 'v2'
  options[:params] ||= {}

  request  = Request.new("discovery/#{options[:version]}/attractions", options[:params], self)
  response = request.get
  Result.search(response, request, 'attractions')
end
search_classifications(options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 46
def search_classifications(options={})
  options[:version] ||= 'v2'
  options[:params] ||= {}

  request  = Request.new("discovery/#{options[:version]}/classifications", options[:params], self)
  response = request.get
  Result.search(response, request, 'classifications')
end
search_events(options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 4
def search_events(options={})
  options[:version] ||= 'v2'
  options[:params] ||= {}

  request  = Request.new("discovery/#{options[:version]}/events", options[:params], self)
  response = request.get
  Result.search(response, request, 'events')
end
search_venues(options={}) click to toggle source
# File lib/ticketmaster/clients/discovery.rb, line 63
def search_venues(options={})
  options[:version] ||= 'v2'
  options[:params] ||= {}

  request  = Request.new("discovery/#{options[:version]}/venues", options[:params], self)
  response = request.get
  Result.search(response, request, 'venues')
end