lib/sportradar/api/soccer/tournament.rb in sportradar-api-0.13.10 vs lib/sportradar/api/soccer/tournament.rb in sportradar-api-0.13.11

- old
+ new

@@ -1,10 +1,10 @@ module Sportradar module Api module Soccer class Tournament < Data - attr_reader :id, :league_group, :name, :category + attr_reader :id, :league_group, :name, :category, :coverage_info, :live_coverage, :season_coverage_info alias :display_name :name alias :alias :name def initialize(data = {}, league_group: nil, **opts) @response = data @@ -24,12 +24,14 @@ def update(data, **opts) if data['tournament'] update(data['tournament']) end - @name = data["name"] || @name - @category = data['category'] || @category + @name = data["name"] || @name + @category = data['category'] || @category + @coverage_info = data['coverage_info'] || @coverage_info + @live_coverage = data.dig('coverage_info', 'live_coverage') || @live_coverage parse_info(data) parse_season(data) parse_results(data) parse_schedule(data) @@ -84,9 +86,10 @@ end end def parse_season(data) if data['season_coverage_info'] + @season_coverage_info = data['season_coverage_info'] if data['season_coverage_info'] data['season_coverage_info']['id'] ||= data['season_coverage_info'].delete('season_id') create_data(@seasons_hash, data['season_coverage_info'], klass: Season, api: api, tournament: self) end if data['current_season'] create_data(@seasons_hash, data['current_season'], klass: Season, api: api, tournament: self, current: true)