Class: Cineworld::API

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/cineworld.rb

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ API

Returns a new instance of API.



10
11
12
# File 'lib/cineworld.rb', line 10

def initialize(key)
  @key = key
end

Instance Method Details

#cinemas(options = {}) ⇒ Object



14
15
16
17
# File 'lib/cineworld.rb', line 14

def cinemas(options = {})
  options.merge!(:key => @key)
  self.class.get('/cinemas', :query => options)
end

#dates(options = {}) ⇒ Object



24
25
26
27
# File 'lib/cineworld.rb', line 24

def dates(options = {})
  options.merge!(:key => @key)
  self.class.get('/dates', :query => options)
end

#films(options = {}) ⇒ Object



19
20
21
22
# File 'lib/cineworld.rb', line 19

def films(options = {})
  options.merge!(:key => @key)
  self.class.get('/films', :query => options)
end

#performances(options = {}) ⇒ Object



29
30
31
32
# File 'lib/cineworld.rb', line 29

def performances(options = {})
  options.merge!(:key => @key)
  self.class.get('/performances', :query => options)
end