Module: OneApiSdk::Client::Movies
- Included in:
- OneApiSdk::Client
- Defined in:
- lib/one_api_sdk/movies.rb
Instance Method Summary collapse
-
#movie(id, query_params = "") ⇒ Hash
Request one specific movie.
-
#movie_quotes(id, query_params = "") ⇒ Hash
Request all movie quotes for one specific movie (only working for the LotR trilogy).
-
#movies(query_params = "") ⇒ Array<Hash>
List of all “The Lord of the Rings” movies, including the “The Lord of the Rings” and the “The Hobbit” movies.
Instance Method Details
#movie(id, query_params = "") ⇒ Hash
Request one specific movie
23 24 25 26 |
# File 'lib/one_api_sdk/movies.rb', line 23 def movie(id,query_params="") response = call_with_token("#{Constants::MOVIE_BASE_PATH}/#{id}#{query_params}") JSON.parse(response.body) end |
#movie_quotes(id, query_params = "") ⇒ Hash
Request all movie quotes for one specific movie (only working for the LotR trilogy)
33 34 35 36 |
# File 'lib/one_api_sdk/movies.rb', line 33 def movie_quotes(id,query_params="") response = call_with_token("#{Constants::MOVIE_BASE_PATH}/#{id}/quote#{query_params}") JSON.parse(response.body) end |
#movies(query_params = "") ⇒ Array<Hash>
List of all “The Lord of the Rings” movies, including the “The Lord of the Rings” and the “The Hobbit” movies.
13 14 15 16 |
# File 'lib/one_api_sdk/movies.rb', line 13 def movies(query_params="") response = call_with_token("#{Constants::MOVIE_BASE_PATH}#{query_params}") JSON.parse(response.body) end |