lib/sportradar/api/basketball/nba/player.rb in sportradar-api-0.9.47 vs lib/sportradar/api/basketball/nba/player.rb in sportradar-api-0.9.48
- old
+ new
@@ -58,19 +58,19 @@
@position = data['position'] if data['position'] # "C",
@primary_position = data['primary_position'] if data['primary_position'] # "C",
@jersey_number = data['jersey_number'] if data['jersey_number'] # "31",
@experience = data['experience'] if data['experience'] # "3",
@college = data['college'] if data['college'] # "Vanderbilt",
- @birth_place = data['birth_place'] if data['birth_place'] # "Benin City,, NGA",
+ @birth_place = data['birth_place'].gsub(',,', ', ') if data['birth_place'] # "Benin City,, NGA",
@birthdate = data['birthdate'] if data['birthdate'] # "1989-10-21",
@updated = data['updated'] if data['updated'] # "2016-07-08T12:11:59+00:00",
update_injuries(data)
update_draft(data)
@team.update_player_stats(self, data['statistics'], opts[:game]) if data['statistics']
if avgs = data.dig('overall', 'average')
- @averages = avgs
- @team.update_player_stats(self, @averages)
+ @averages = avgs.except(:player)
+ @team.update_player_stats(self, avgs)
end
self
end