Class: Capitan::Shows

Inherits:
Object
  • Object
show all
Defined in:
lib/capitan/shows.rb

Class Method Summary collapse

Class Method Details

.all(type = 'all') ⇒ Object



3
4
5
6
7
# File 'lib/capitan/shows.rb', line 3

def self.all(type = 'all')
  connection = Capitan::Connection.new
  response = connection.invoke_with_path("shows/#{type}")
  process_response(response)
end

.find(type, params) ⇒ Object



9
10
11
12
13
# File 'lib/capitan/shows.rb', line 9

def self.find(type, params)
  connection = Capitan::Connection.new
  response = connection.invoke_with_path("shows/search/#{search_type(type)}", params)
  process_response(response)
end

.typesObject



15
16
17
18
19
20
21
22
23
# File 'lib/capitan/shows.rb', line 15

def self.types
  {
    :all => 'all',
    :productions => 'productions',
    :non_ticketed_events => 'events',
    :exhibitions => 'exhibitions'
  }

end