lib/sportradar/api/basketball/nba/game.rb in sportradar-api-0.9.55 vs lib/sportradar/api/basketball/nba/game.rb in sportradar-api-0.9.56
- old
+ new
@@ -1,11 +1,11 @@
module Sportradar
module Api
module Basketball
class Nba
class Game < Data
- attr_accessor :response, :id, :home, :away, :home_id, :away_id, :score, :scoring, :status, :scheduled, :venue, :broadcast, :clock, :duration, :attendance, :quarter, :team_stats, :player_stats, :changes, :media_timeouts
+ attr_accessor :response, :id, :home_id, :away_id, :score, :scoring, :status, :scheduled, :venue, :broadcast, :clock, :duration, :attendance, :quarter, :team_stats, :player_stats, :changes, :media_timeouts
@all_hash = {}
# def self.new(data, **opts)
# existing = @all_hash[data['id']]
# if existing
# existing.update(data, **opts)
@@ -267,13 +267,14 @@
end
__END__
ss = sr.schedule;
-sr = Sportradar::Api::Basketball::Nba.new
sd = sr.daily_schedule;
+sr = Sportradar::Api::Basketball::Nba.new
sd = sr.daily_schedule(Date.yesterday)
-g = sd.games.last;
+sd = sr.daily_schedule(Date.new(2017, 1, 20))
+g = sd.games.first;
box = g.get_box;
pbp = g.get_pbp;
g.quarters.size
g.plays.size
\ No newline at end of file