sportradar-api 0.9.39 → 0.9.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sportradar/api/basketball/nba/game.rb +14 -20
- data/lib/sportradar/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 578ef9f161073692f273f07a8a11f32cb98f5568
|
|
4
|
+
data.tar.gz: f51b741c3b5c351cd6378c6977fe638ea21c5194
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 539f9758ddc3217662f6f70962b78acbba8d3dd11cf7c9bdc569c73a806d093841ccea948357f08b3824fb3773c4a8ac5164a92be63d0ab8120ae262bdd7ec75
|
|
7
|
+
data.tar.gz: e1c38ba977bd6bbe2c76e184d4141c1e97700c2e499b0d6a9830aa99ba7d7555e0d232d26a1032667743310aeb8a13c2ced7b7fe0e655384e14bf249cbbbea20
|
data/Gemfile.lock
CHANGED
|
@@ -5,18 +5,18 @@ module Sportradar
|
|
|
5
5
|
class Game < Data
|
|
6
6
|
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
|
|
7
7
|
@all_hash = {}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
def self.new(data, **opts)
|
|
9
|
+
existing = @all_hash[data['id']]
|
|
10
|
+
if existing
|
|
11
|
+
existing.update(data, **opts)
|
|
12
|
+
existing
|
|
13
|
+
else
|
|
14
|
+
@all_hash[data['id']] = super
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
def self.all
|
|
18
|
+
@all_hash.values
|
|
19
|
+
end
|
|
20
20
|
|
|
21
21
|
def initialize(data, **opts)
|
|
22
22
|
@response = data
|
|
@@ -88,8 +88,8 @@ module Sportradar
|
|
|
88
88
|
@scheduled = Time.parse(data["scheduled"]) if data["scheduled"]
|
|
89
89
|
@venue = Venue.new(data['venue']) if data['venue']
|
|
90
90
|
@broadcast = Broadcast.new(data['broadcast']) if data['broadcast']
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
@home = Team.new(data['home'], api: api, game: self) if data['home']
|
|
92
|
+
@away = Team.new(data['away'], api: api, game: self) if data['away']
|
|
93
93
|
|
|
94
94
|
@duration = data['duration'] if data['duration']
|
|
95
95
|
@clock = data['clock'] if data['clock']
|
|
@@ -106,12 +106,6 @@ module Sportradar
|
|
|
106
106
|
|
|
107
107
|
create_data(@teams_hash, data['team'], klass: Team, api: api, game: self) if data['team']
|
|
108
108
|
end
|
|
109
|
-
def home
|
|
110
|
-
@teams_hash[@home_id]
|
|
111
|
-
end
|
|
112
|
-
def away
|
|
113
|
-
@teams_hash[@away_id]
|
|
114
|
-
end
|
|
115
109
|
|
|
116
110
|
def box
|
|
117
111
|
@box ||= get_box
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sportradar-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.40
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Eggett
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-01-
|
|
11
|
+
date: 2017-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|