Class: Sportradar::Api::Football::Ncaafb::Team
- Inherits:
-
Team
- Object
- Data
- Team
- Sportradar::Api::Football::Ncaafb::Team
show all
- Defined in:
- lib/sportradar/api/football/ncaafb/team.rb
Instance Attribute Summary
Attributes inherited from Team
#full_name, #id, #market, #name, #player_stats, #records, #remaining_timeouts, #response, #season, #seed, #stats, #team_stats, #type, #venue
Instance Method Summary
collapse
Methods inherited from Team
#add_game, #games, #get_roster, #get_season_stats, #handle_names, #ingest_roster, #ingest_season_stats, #initialize, #parse_players, #parse_season_stats, #path_base, #path_base_stats, #queue_roster, #queue_season_stats, #record, #season_year, #timeouts, #update, #update_player_stats
Methods inherited from Data
#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data
Instance Method Details
#alias ⇒ Object
7
8
9
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 7
def alias
id
end
|
#ncaafb_season ⇒ Object
40
41
42
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 40
def ncaafb_season
@type || default_season
end
|
#parse_records(data) ⇒ Object
15
16
17
18
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 15
def parse_records(data)
@records['overall'] = Record.new(data['overall'], type: 'overall')
end
|
#path_roster ⇒ Object
30
31
32
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 30
def path_roster
"#{ path_base }/roster"
end
|
#path_season_stats(year = season_year, season = ncaafb_season) ⇒ Object
33
34
35
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 33
def path_season_stats(year = season_year, season = ncaafb_season)
"#{path_base}/#{year}/#{ncaafb_season}/statistics"
end
|
#player_class ⇒ Object
26
27
28
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 26
def player_class
Player
end
|
#players ⇒ Object
Also known as:
roster
20
21
22
23
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 20
def players
get_roster if @players_hash.empty?
@players_hash.values
end
|
#used_timeouts ⇒ Object
11
12
13
|
# File 'lib/sportradar/api/football/ncaafb/team.rb', line 11
def used_timeouts
3 - remaining_timeouts.to_i
end
|