lib/sportradar/api/mma/fight.rb in sportradar-api-0.20.0.pre2 vs lib/sportradar/api/mma/fight.rb in sportradar-api-0.20.0
- old
+ new
@@ -19,10 +19,13 @@
def fighters
@fighters_hash.values
end
def update(data, **opts)
+ if data["summaries"]
+ update(data["summaries"][0])
+ end
if data["sport_event"]
update(data["sport_event"])
end
if data["sport_event_status"]
update(data["sport_event_status"])
@@ -91,10 +94,10 @@
def structure_stats(data)
data['competitors'].map { |comp_data| [comp_data['id'], comp_data.merge(comp_data.delete('statistics'))] }.to_h
end
def api
- @api ||= Sportradar::Api::Mma.new
+ @api ||= Sportradar::Api::Mma::Api.new
end
def path_base
"sport_events/#{ id }"