Class: Sportradar::Feeds::LeagueSchedule

Inherits:
ApiRequest
  • Object
show all
Defined in:
lib/sportradar/feeds/league_schedule.rb

Instance Method Summary collapse

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

#pathObject



9
10
11
# File 'lib/sportradar/feeds/league_schedule.rb', line 9

def path
  "games/#{year}/#{interval_type}/schedule.json"
end