Module: Ticketmaster::Client::Discovery

Included in:
Ticketmaster::Client
Defined in:
lib/ticketmaster/clients/discovery.rb

Instance Method Summary collapse

Instance Method Details

#get_attraction(id, options = {}) ⇒ Object



38
39
40
41
42
43
44
# 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 = {}) ⇒ Object



55
56
57
58
59
60
61
# 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 = {}) ⇒ Object



13
14
15
16
17
18
19
# 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 = {}) ⇒ Object



21
22
23
24
25
26
27
# 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 = {}) ⇒ Object



80
81
82
83
84
85
86
# 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 = {}) ⇒ Object



72
73
74
75
76
77
78
# 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 = {}) ⇒ Object



29
30
31
32
33
34
35
36
# 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 = {}) ⇒ Object



46
47
48
49
50
51
52
53
# 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 = {}) ⇒ Object



4
5
6
7
8
9
10
11
# 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 = {}) ⇒ Object



63
64
65
66
67
68
69
70
# 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