sportradar-api 0.9.41 → 0.9.45

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fb2c3f2581a5b59799a231997153d8be9dfc71d
4
- data.tar.gz: 5405ad415eb7b12181ebdc847ec6a388ed294512
3
+ metadata.gz: 391bdcd3efb5e513444c975214f221f677bb8130
4
+ data.tar.gz: 387842592a3f0136717e33d7b65123c70568fbcc
5
5
  SHA512:
6
- metadata.gz: f497445c3324d703c475e2da7398303db43119e1770e5a210a4251bdde3b5e78bbec6452d9899d6e55370d4365bab8bbf5c04cd2e00db3ae2ca99805a91207d1
7
- data.tar.gz: 783be4187844e23e6a957a306f5e4e74ab4e689a6091214166591af6183befca2d38dd72e4f823b623871342073f6cbdef1f25853f16229fb1bc2b2a5de227d4
6
+ metadata.gz: 3faaac8258c28e946f48232e3406fcb230b3672fae28fa5b9336136fdbdc3bbd3fd4ec979382c94adb0a9f9a561314f3916d03ca0ee6e4302dc30d2f94a3c695
7
+ data.tar.gz: 1be69578c9f1b71a31565988f17d8d917e082931101a64a1b7a9e6afa558d0aa78e3fd0c3bd459d87a51af1d6a27583a931527779b6fcd0fcaf8de7028403005
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.9.41)
4
+ sportradar-api (0.9.45)
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
@@ -27,7 +27,7 @@ module Sportradar
27
27
  @home = OpenStruct.new(id: game.home.id, alias: game.home.alias, name: game.home.name, full_name: game.home.full_name)
28
28
  @away = OpenStruct.new(id: game.away.id, alias: game.away.alias, name: game.away.name, full_name: game.away.full_name)
29
29
  rescue => e
30
- puts e
30
+ binding.pry
31
31
  end
32
32
 
33
33
  def points(team_id)
@@ -54,7 +54,7 @@ module Sportradar
54
54
  when Array
55
55
  data.each do |hash|
56
56
  current = existing[hash['id']]
57
- current ? current.update(hash, **opts) : existing[hash['id']] = klass.new(hash, **opts)
57
+ current ? current.update(hash) : existing[hash['id']] = klass.new(hash, **opts)
58
58
  existing[hash['id']]
59
59
  end
60
60
  when Hash
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.9.41"
3
+ VERSION = "0.9.45"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportradar-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.41
4
+ version: 0.9.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett