lib/sportradar/api/basketball/game.rb in sportradar-api-0.13.4 vs lib/sportradar/api/basketball/game.rb in sportradar-api-0.13.5

- old
+ new

@@ -210,11 +210,11 @@ clock_display end end def halftime? - clock == '0:00' && quarter == 2 + status == 'halftime' || clock == '00:00' && quarter == 2 end def clock_display if clock && period "#{clock} #{period_display}" end @@ -264,11 +264,11 @@ end # data retrieval def get_box - data = api.get_data(path_box) + data = api.get_data(path_box).to_h ingest_box(data) end def ingest_box(data) update(data, source: :box) @@ -281,11 +281,11 @@ url, headers, options, timeout = api.get_request_info(path_pbp) {url: url, headers: headers, params: options, timeout: timeout, callback: method(:ingest_pbp)} end def get_pbp - data = api.get_data(path_pbp) + data = api.get_data(path_pbp).to_h ingest_pbp(data) end def ingest_pbp(data) period_name = 'periods' @@ -303,15 +303,16 @@ period_data.concat(extra_periods) end set_pbp(period_data) @pbp = @periods_hash.values check_newness(:pbp, plays.last&.updated) + check_newness(:clock, @clock) check_newness(:score, @score) data end def get_summary - data = api.get_data(path_summary) + data = api.get_data(path_summary).to_h ingest_summary(data) end def queue_summary url, headers, options, timeout = api.get_request_info(path_summary)