sportradar-api 0.9.39 → 0.9.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 644ff80ed9d43523cf0125a8a3503f27b02d70a4
4
- data.tar.gz: 1cb24145b5c8bf7ad7b5ae0e2df3ba7537e84768
3
+ metadata.gz: 578ef9f161073692f273f07a8a11f32cb98f5568
4
+ data.tar.gz: f51b741c3b5c351cd6378c6977fe638ea21c5194
5
5
  SHA512:
6
- metadata.gz: 44040d98009193dffc2e390c04feef63b2354d027dff33df6cb9c0638e15ce7b2e50efc5af1f131b11275eb3dba0bd35daa144b46e2d5771c098517b49b1ef0c
7
- data.tar.gz: 35ceba94c386d7c01fce989b47a75fc58bca64d2acf21dfa66b5509cc246ff4ff99bee11bbba74010cca8c99d227826555289df21258c51588cafb4672f8a715
6
+ metadata.gz: 539f9758ddc3217662f6f70962b78acbba8d3dd11cf7c9bdc569c73a806d093841ccea948357f08b3824fb3773c4a8ac5164a92be63d0ab8120ae262bdd7ec75
7
+ data.tar.gz: e1c38ba977bd6bbe2c76e184d4141c1e97700c2e499b0d6a9830aa99ba7d7555e0d232d26a1032667743310aeb8a13c2ced7b7fe0e655384e14bf249cbbbea20
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.9.39)
4
+ sportradar-api (0.9.40)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -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
- # 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
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
- # @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']
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
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.9.39"
3
+ VERSION = "0.9.40"
4
4
  end
5
5
  end
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.39
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 00:00:00.000000000 Z
11
+ date: 2017-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler