Module: Fantasydata::API::BoxScore

Includes:
Utils
Included in:
Client
Defined in:
lib/fantasydata/api/box_score.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

#box_score_by_team(season, week, home_team) ⇒ Fantasydata::BoxScore

This method returns individual box scores for a given season, week and home team.

Examples:

box_score_by_team

Fantasydata.box_score_by_team('2015REG', 15, 'MIN')

Raises:

See Also:



20
21
22
# File 'lib/fantasydata/api/box_score.rb', line 20

def box_score_by_team(season, week, home_team)
  object_from_response(Fantasydata::BoxScore, :get, "/nfl/v2/JSON/BoxScore/#{season}/#{week}/#{home_team}")
end

#box_scores_activeArray<Fantasydata::BoxScore>

This method returns box scores for all games that are either in-progress or have been updated within the last 30 minutes.

Examples:

box_scores_active

Fantasydata.box_scores_active

Raises:

See Also:



49
50
51
# File 'lib/fantasydata/api/box_score.rb', line 49

def box_scores_active
  objects_from_response(Fantasydata::BoxScore, :get, "/nfl/v2/JSON/ActiveBoxScores")
end

#box_scores_by_week(season, week) ⇒ Array<Fantasydata::BoxScore>

This method returns all box scores for a given season and week.

Examples:

box_scores_by_week

Fantasydata.box_scores_by_week('2015REG', 15)

Raises:

See Also:



36
37
38
# File 'lib/fantasydata/api/box_score.rb', line 36

def box_scores_by_week(season, week)
  objects_from_response(Fantasydata::BoxScore, :get, "/nfl/v2/JSON/BoxScores/#{season}/#{week}")
end

#box_scores_delta(season, week, minutes) ⇒ Array<Fantasydata::BoxScore>

This method returns all box scores for a given season and week, but only returns player stats that have changed in the last X minutes.

Examples:

box_scores_delta

Fantasydata.box_scores_delta('2014REG', 1, 5)

Raises:

See Also:



65
66
67
# File 'lib/fantasydata/api/box_score.rb', line 65

def box_scores_delta(season, week, minutes)
  objects_from_response(Fantasydata::BoxScore, :get, "/nfl/v2/JSON/BoxScoresDelta/#{season}/#{week}/#{minutes}")
end

#box_scores_delta_current_week(minutes) ⇒ Array<Fantasydata::BoxScore>

This method returns all box scores for the current week, but only returns player stats that have changed in the last X minutes.

Examples:

box_scores_delta_current_week

Fantasydata.box_scores_delta_current_week(5)

Raises:

See Also:



79
80
81
# File 'lib/fantasydata/api/box_score.rb', line 79

def box_scores_delta_current_week(minutes)
  objects_from_response(Fantasydata::BoxScore, :get, "/nfl/v2/JSON/RecentlyUpdatedBoxScores/#{minutes}")
end

#box_scores_finalArray<Fantasydata::BoxScore>

Examples:

box_scores_final

Fantasydata.box_scores_final

Raises:

See Also:



92
93
# File 'lib/fantasydata/api/box_score.rb', line 92

def box_scores_final
end

#box_scores_liveArray<Fantasydata::BoxScore>

Examples:

box_scores_live

Fantasydata.box_scores_live

Raises:

See Also:



104
105
# File 'lib/fantasydata/api/box_score.rb', line 104

def box_scores_live
end