Module: Fantasydata::API::Fantasy
- Includes:
- Utils
- Included in:
- Client
- Defined in:
- lib/fantasydata/api/fantasy.rb
Constant Summary
Constants included
from Utils
Utils::API_KEY_CANNOT_CALL_THIS_METHOD, Utils::INVALID_PARAMETER, Utils::MISSING_OR_INVALID_KEY, Utils::MISSING_PARAMETER, Utils::RATE_LIMIT_EXCEEDED, Utils::SUCCESS
Instance Method Summary
collapse
Instance Method Details
#daily_fantasy_defense_game_projected_stats(year, week) ⇒ Object
42
43
44
|
# File 'lib/fantasydata/api/fantasy.rb', line 42
def daily_fantasy_defense_game_projected_stats year, week
objects_from_response(Fantasydata::DailyFantasyPlayerStats, :get, "/nfl/v2/JSON/FantasyDefenseProjectionsByGame/#{year}/#{week}")
end
|
#daily_fantasy_defense_game_stats(year, week) ⇒ Object
38
39
40
|
# File 'lib/fantasydata/api/fantasy.rb', line 38
def daily_fantasy_defense_game_stats year, week
objects_from_response(Fantasydata::DailyFantasyPlayerStats, :get, "/nfl/v2/JSON/FantasyDefenseByGame/#{year}/#{week}")
end
|
#daily_fantasy_defense_season_projected_stats(year) ⇒ Object
50
51
52
|
# File 'lib/fantasydata/api/fantasy.rb', line 50
def daily_fantasy_defense_season_projected_stats year
objects_from_response(Fantasydata::DailyFantasyPlayerStats, :get, "/nfl/v2/JSON/FantasyDefenseProjectionsBySeason/#{year}")
end
|
#daily_fantasy_defense_season_stats(year) ⇒ Object
46
47
48
|
# File 'lib/fantasydata/api/fantasy.rb', line 46
def daily_fantasy_defense_season_stats year
objects_from_response(Fantasydata::DailyFantasyPlayerStats, :get, "/nfl/v2/JSON/FantasyDefenseBySeason/#{year}")
end
|
#daily_fantasy_players_for_day(day) ⇒ Fantasydata::BoxScore
Gets daily fantasy player information for given day.
18
19
20
21
|
# File 'lib/fantasydata/api/fantasy.rb', line 18
def daily_fantasy_players_for_day(day)
day = convert_to_date(day)
objects_from_response(Fantasydata::DailyFantasyPlayer, :get, "/nfl/v2/JSON/DailyFantasyPlayers/#{day}")
end
|
#daily_fantasy_points_for_day(day) ⇒ Fantasydata::BoxScore
Get daily fantasy points for a given day.
33
34
35
36
|
# File 'lib/fantasydata/api/fantasy.rb', line 33
def daily_fantasy_points_for_day(day)
day = convert_to_date(day)
objects_from_response(Fantasydata::DailyFantasyPoints, :get, "/nfl/v2/JSON/DailyFantasyPoints/#{day}")
end
|
#fantasy_players_adp ⇒ Object
54
55
56
|
# File 'lib/fantasydata/api/fantasy.rb', line 54
def fantasy_players_adp
objects_from_response(Fantasydata::FantasyPlayerAdp, :get, "/nfl/v2/JSON/FantasyPlayers")
end
|