lib/sportradar/api/basketball/game.rb in sportradar-api-0.15.1 vs lib/sportradar/api/basketball/game.rb in sportradar-api-0.16.0
- old
+ new
@@ -1,10 +1,10 @@
module Sportradar
module Api
module Basketball
class Game < Data
- attr_accessor :response, :id, :title, :home_id, :away_id, :score, :status, :coverage, :scheduled, :venue, :broadcast, :clock, :duration, :attendance, :team_stats, :player_stats, :changes, :media_timeouts
+ attr_accessor :response, :id, :title, :home_id, :away_id, :score, :status, :coverage, :time_zone, :scheduled, :venue, :broadcast, :clock, :duration, :attendance, :team_stats, :player_stats, :changes, :media_timeouts
attr_accessor :period
@all_hash = {}
# def self.new(data, **opts)
# existing = @all_hash[data['id']]
@@ -92,9 +92,10 @@
@broadcast = Broadcast.new(data['broadcast']) if !data['broadcast'].to_h.empty?
@home = team_class.new(data['home'], api: api, game: self) if data['home']
@away = team_class.new(data['away'], api: api, game: self) if data['away']
@title = data['title'] || @title || (home && away && "#{home.full_name} vs #{away.full_name}")
+ @time_zone = data.dig("time_zones", "venue") if data.dig("time_zones", "venue")
@duration = data['duration'] if data['duration']
@clock = data['clock'] if data['clock']
@attendance = data['attendance'] if data['attendance']
@lead_changes = data['lead_changes'] if data['lead_changes']
@times_tied = data['times_tied'] if data['times_tied']