Class: JustWatch::Movie

Inherits:
Content
  • Object
show all
Defined in:
lib/just_watch/movie.rb

Constant Summary collapse

MOVIE_CONTENT_TYPE =
'movie'

Instance Attribute Summary

Attributes inherited from Content

#director, #full_path, #genre_ids, #imdb_id, #justwatch_id, #object_type, #offers, #original_language, #original_release_year, #original_title, #production_countries, #runtime, #title, #tmdb_id

Class Method Summary collapse

Class Method Details

.offers_by_id(id:, service_id_type:, locale: Api.locale) ⇒ Object



8
9
10
11
12
# File 'lib/just_watch/movie.rb', line 8

def offers_by_id(id:, service_id_type:, locale: Api.locale)
  movie = Api.request(offers_by_id_path(MOVIE_CONTENT_TYPE, service_id_type, locale), id: id)

  new(movie.slice(*members))
end

.offers_by_title_and_year(title:, year:, locale: Api.locale) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/just_watch/movie.rb', line 14

def offers_by_title_and_year(title:, year:, locale: Api.locale)
  movie = Api.request(
    offers_by_title_and_year_path(MOVIE_CONTENT_TYPE, locale),
    title: title, release_year: year
  )
  new(movie.slice(*members))
end