Class: Sportradar::Feeds::LeagueSchedule
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- Sportradar::Feeds::LeagueSchedule
- Defined in:
- lib/sportradar/feeds/league_schedule.rb
Direct Known Subclasses
TeamStatistics, Mlb::LeagueSchedule, Nba::LeagueSchedule, Nfl::LeagueSchedule, Nfl::Rankings, Nfl::Standings, Nhl::LeagueSchedule
Instance Method Summary collapse
-
#initialize(year: nil, interval_type: nil) ⇒ LeagueSchedule
constructor
A new instance of LeagueSchedule.
- #path ⇒ Object
Methods inherited from ApiRequest
#client, #endpoint, fetch, #fetch, #league, save, #save
Constructor Details
#initialize(year: nil, interval_type: nil) ⇒ LeagueSchedule
Returns a new instance of LeagueSchedule.
4 5 6 7 |
# File 'lib/sportradar/feeds/league_schedule.rb', line 4 def initialize(year: nil, interval_type: nil) @year = year || Date.today.strftime('%Y') @interval_type = interval_type || 'reg' end |
Instance Method Details
#path ⇒ Object
9 10 11 |
# File 'lib/sportradar/feeds/league_schedule.rb', line 9 def path "games/#{year}/#{interval_type}/schedule.json" end |