Class: TvMaze::Schedule
- Inherits:
-
ApiResource
- Object
- OpenStruct
- ApiResource
- TvMaze::Schedule
- Defined in:
- lib/tv_maze/models/schedule.rb
Class Method Summary collapse
-
.fetch(date: Date.today, country: 'US') ⇒ Object
The schedule is a complete list of episodes that air in a given country on a given date.
-
.full ⇒ Object
The full schedule is a list of all future episodes known to TVmaze.
Class Method Details
.fetch(date: Date.today, country: 'US') ⇒ Object
The schedule is a complete list of episodes that air in a given country on a given date. Episodes are returned in the order in which they are aired, and full information about the episode and the corresponding show is included.
3 4 5 6 7 |
# File 'lib/tv_maze/models/schedule.rb', line 3 def self.fetch(date: Date.today, country: 'US') params = {country: country, date: date.to_date.strftime} build_collection(TvMaze::Requester.get("schedule", params), TvMaze::ScheduleRepresenter) end |
.full ⇒ Object
The full schedule is a list of all future episodes known to TVmaze
10 11 12 |
# File 'lib/tv_maze/models/schedule.rb', line 10 def self.full build_collection(TvMaze::Requester.get("schedule/full"), TvMaze::ScheduleRepresenter) end |