lib/sportradar/api/football/team.rb in sportradar-api-0.12.0 vs lib/sportradar/api/football/team.rb in sportradar-api-0.12.1
- old
+ new
@@ -85,20 +85,25 @@
alias :roster :players
def parse_players(data, game)
create_data(@players_hash, data, klass: player_class, api: api, team: self, game: game)
end
def update_player_stats(player, stats, game = nil)
- game ? game.update_player_stats(player, stats) : @player_stats.merge!(player.id => stats.merge!(player: player))
+ game ? game.update_player_stats(player, stats) : @player_stats.merge!(player.id => stats.merge(player: player))
end
def get_roster
data = api.get_data(path_roster).to_h
ingest_roster(data)
end
def ingest_roster(data)
update(data)
data
end
+ def queue_roster
+ url, headers, options, timeout = api.get_request_info(path_roster)
+ {url: url, headers: headers, params: options, timeout: timeout, callback: method(:ingest_roster)}
+ end
+
def get_season_stats(year = default_year)
data = api.get_data(path_season_stats(year)).to_h
ingest_season_stats(data)
end