Class: Team
Class Method Summary collapse
-
.bye_week(week, teams = []) ⇒ Object
returns teams based on week.
-
.byes ⇒ Object
returns teams and their bye weeks.
-
.defense(team, week) ⇒ Object
returns a teams defense statistics for the week.
-
.defense_projections ⇒ Object
returns defense projections for the season.
-
.defense_scoring ⇒ Object
returns defense scoring statistics for the season.
-
.defense_scoring_by_team(team) ⇒ Object
returns defense scoring statistics by team.
-
.defenses(week) ⇒ Object
returns all team defense statistics for the week.
-
.news(team) ⇒ Object
returns news about a team.
-
.schedule ⇒ Object
returns schedule for given season.
-
.scores ⇒ Object
returns scores for given season.
-
.scores_by_week(week) ⇒ Object
returns scores for given week.
-
.standings ⇒ Object
returns standings.
Methods included from API::Request
base_url, build_url, headers, request_service
Class Method Details
.bye_week(week, teams = []) ⇒ Object
returns teams based on week
17 18 19 20 |
# File 'lib/team.rb', line 17 def self.bye_week week, teams = [] self.byes.each { |team| teams.push(team) if team['Week'] == week } teams end |
.byes ⇒ Object
returns teams and their bye weeks
12 13 14 |
# File 'lib/team.rb', line 12 def self.byes request_service('Byes', CoreExtensions::Fantasy::Date.regular_season) end |
.defense(team, week) ⇒ Object
returns a teams defense statistics for the week
28 29 30 |
# File 'lib/team.rb', line 28 def self.defense team, week request_service('FantasyDefenseByGameByTeam', [CoreExtensions::Fantasy::Date.last_season, week, team]) end |
.defense_projections ⇒ Object
returns defense projections for the season
38 39 40 |
# File 'lib/team.rb', line 38 def self.defense_projections request_service('FantasyDefenseProjectionsBySeason', CoreExtensions::Fantasy::Date.last_season) end |
.defense_scoring ⇒ Object
returns defense scoring statistics for the season
33 34 35 |
# File 'lib/team.rb', line 33 def self.defense_scoring request_service('FantasyDefenseBySeason', CoreExtensions::Fantasy::Date.last_season) end |
.defense_scoring_by_team(team) ⇒ Object
returns defense scoring statistics by team
43 44 45 |
# File 'lib/team.rb', line 43 def self.defense_scoring_by_team team request_service('FantasyDefenseBySeasonByTeam', [CoreExtensions::Fantasy::Date.last_season, team]) end |
.defenses(week) ⇒ Object
returns all team defense statistics for the week
23 24 25 |
# File 'lib/team.rb', line 23 def self.defenses week request_service('FantasyDefenseByGame', [CoreExtensions::Fantasy::Date.last_season, week]) end |
.news(team) ⇒ Object
returns news about a team
7 8 9 |
# File 'lib/team.rb', line 7 def self.news team request_service('NewsByTeam', team) end |
.schedule ⇒ Object
returns schedule for given season
48 49 50 |
# File 'lib/team.rb', line 48 def self.schedule request_service('Schedules', CoreExtensions::Fantasy::Date.regular_season) end |
.scores ⇒ Object
returns scores for given season
53 54 55 |
# File 'lib/team.rb', line 53 def self.scores request_service('Scores', CoreExtensions::Fantasy::Date.last_season) end |
.scores_by_week(week) ⇒ Object
returns scores for given week
58 59 60 |
# File 'lib/team.rb', line 58 def self.scores_by_week week request_service('ScoresByWeek', [CoreExtensions::Fantasy::Date.last_season, week]) end |
.standings ⇒ Object
returns standings
63 64 65 |
# File 'lib/team.rb', line 63 def self.standings request_service('Standings', CoreExtensions::Fantasy::Date.last_season) end |