Module: Movies

Included in:
DataDelivery
Defined in:
lib/data_delivery/movies.rb

Instance Method Summary collapse

Instance Method Details

#movie_airings(root_id, lineup_id, start_date_time, params) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/data_delivery/movies.rb', line 8

def movie_airings(root_id, lineup_id, start_date_time, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:lineupId] = lineup_id
  params[:startDateTime] = start_date_time
  JSON.parse(get("movies/#{root_id}/airings", params))
end

#movie_airings_by_lineup(lineup_id, start_date_time, params) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/data_delivery/movies.rb', line 16

def (lineup_id, start_date_time, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:lineupId] = lineup_id
  params[:startDateTime] = start_date_time
  JSON.parse(get('movies/airings', params))
end

#movie_future_releases(release_date, params) ⇒ Object



38
39
40
41
42
43
# File 'lib/data_delivery/movies.rb', line 38

def movie_future_releases(release_date, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:releaseDate] = release_date
  JSON.parse(get('movies/futureReleases', params))
end

#movie_showtimes(movie_id, start_date, params) ⇒ Object



24
25
26
27
28
29
# File 'lib/data_delivery/movies.rb', line 24

def movie_showtimes(movie_id, start_date, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:startDate] = start_date
  JSON.parse(get("movies/#{movie_id}/showings", params))
end

#movie_showtimes_local(start_date, params) ⇒ Object



31
32
33
34
35
36
# File 'lib/data_delivery/movies.rb', line 31

def movie_showtimes_local(start_date, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:startDate] = start_date
  JSON.parse(get('movies/showings', params))
end

#movie_versions(root_id, params) ⇒ Object



2
3
4
5
6
# File 'lib/data_delivery/movies.rb', line 2

def movie_versions(root_id, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  JSON.parse(get("movies/#{root_id}/versions", params))
end

#screenplay_trailers(root_id, params) ⇒ Object



45
46
47
48
49
50
# File 'lib/data_delivery/movies.rb', line 45

def screenplay_trailers(root_id, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:rootids] = root_id
  JSON.parse(get('screenplayTrailers', params))
end

#theaters_by_postal_code(params) ⇒ Object



52
53
54
55
56
# File 'lib/data_delivery/movies.rb', line 52

def theaters_by_postal_code(params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  JSON.parse(get('theaters', params))
end

#theaters_details(theater_id) ⇒ Object



58
59
60
61
# File 'lib/data_delivery/movies.rb', line 58

def theaters_details(theater_id)
  params = { api_key: @api_key}
  JSON.parse(get("movies/#{theater_id}", params))
end

#theaters_showtimes(theater_id, start_date, params) ⇒ Object



63
64
65
66
67
68
# File 'lib/data_delivery/movies.rb', line 63

def theaters_showtimes(theater_id, start_date, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:startDate] = start_date
  JSON.parse(get("theaters/#{theater_id}/showings", params))
end