Module: SportsDataApi::Nfl
- Extended by:
- Request
- Defined in:
- lib/sports_data_api/nfl.rb,
lib/sports_data_api/nfl/game.rb,
lib/sports_data_api/nfl/team.rb,
lib/sports_data_api/nfl/week.rb,
lib/sports_data_api/nfl/teams.rb,
lib/sports_data_api/nfl/venue.rb,
lib/sports_data_api/nfl/player.rb,
lib/sports_data_api/nfl/season.rb,
lib/sports_data_api/nfl/broadcast.rb
Defined Under Namespace
Classes: Broadcast, Game, Player, Season, Team, Teams, Venue, Week
Constant Summary
collapse
- API_VERSION =
2
- BASE_URL =
'https://api.sportradar.us/nfl-%{access_level}%{version}'.freeze
- SPORT =
:nfl
- DIR =
File.join(File.dirname(__FILE__), SPORT.to_s)
Class Method Summary
collapse
Methods included from Request
response_json, response_xml, response_xml_xpath
Class Method Details
.boxscore(game_id) ⇒ Object
28
29
30
|
# File 'lib/sports_data_api/nfl.rb', line 28
def boxscore(game_id)
Game.new(response_json("/games/#{game_id}/boxscore.json"))
end
|
.game_roster(game_id) ⇒ Object
36
37
38
|
# File 'lib/sports_data_api/nfl.rb', line 36
def game_roster(game_id)
Game.new(response_json("/games/#{game_id}/roster.json"))
end
|
.game_statistics(game_id) ⇒ Object
32
33
34
|
# File 'lib/sports_data_api/nfl.rb', line 32
def game_statistics(game_id)
Game.new(response_json("/games/#{game_id}/statistics.json"))
end
|
.schedule(year, season) ⇒ Object
20
21
22
|
# File 'lib/sports_data_api/nfl.rb', line 20
def schedule(year, season)
Season.new(response_json("/games/#{year}/#{season}/schedule.json"))
end
|
.team_roster(team_id) ⇒ Object
24
25
26
|
# File 'lib/sports_data_api/nfl.rb', line 24
def team_roster(team_id)
Team.new(response_json("/teams/#{team_id}/full_roster.json"))
end
|
.teams ⇒ Object
40
41
42
|
# File 'lib/sports_data_api/nfl.rb', line 40
def teams
Teams.new(response_json('/league/hierarchy.json'))
end
|