Class: JustWatch::Season

Inherits:
Struct
  • Object
show all
Defined in:
lib/just_watch/season.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#episodesObject

Returns the value of attribute episodes

Returns:

  • (Object)

    the current value of episodes



4
5
6
# File 'lib/just_watch/season.rb', line 4

def episodes
  @episodes
end

#season_numberObject

Returns the value of attribute season_number

Returns:

  • (Object)

    the current value of season_number



4
5
6
# File 'lib/just_watch/season.rb', line 4

def season_number
  @season_number
end

Class Method Details

.offers_by_id_and_season_number(id:, service_id_type:, season_number:, locale: Api.locale) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/just_watch/season.rb', line 6

def offers_by_id_and_season_number(id:, service_id_type:, season_number:, locale: Api.locale)
  season = Api.request(
    offers_by_id_and_season_number_path(service_id_type, season_number, locale), id: id
  )

  new(season.slice(*members))
end

.offers_by_title_year_and_season_number(title:, year:, season_number:, locale: Api.locale) ⇒ Object



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

def offers_by_title_year_and_season_number(title:, year:, season_number:, locale: Api.locale)
  season = Api.request(
    offers_by_title_year_and_season_number_path(season_number, locale), title: title, release_year: year
  )

  new(season.slice(*members))
end