sportradar-api 0.10.0 → 0.10.1

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: c581dc49486091f914b06012ed63bc677c1f8895
4
- data.tar.gz: c49f9b968861446d05a1711910e38ef9d7a5912a
3
+ metadata.gz: f4618970da2561389f48e3ab6bcdc5fe8410a042
4
+ data.tar.gz: 4c0398884c90825e73ff8a39f101a49f9c382fef
5
5
  SHA512:
6
- metadata.gz: ff1e4b3730f1d164f335e3d981db11e4598bdaf5948c67c0d74b5c0de4f732e7e762ce4185c7ac6c3d6c06d4f9bb4b82b6345189b76afce1df9f7544502458d5
7
- data.tar.gz: 924d7e1cf9a9413a18caace93e0a4da48fee2a024fd0804dfaa77e12fb09d4cb6bc9563c7c8fb6f1dedd127c82e1cbfc8b9cae558831c5153ddc1e65d010beae
6
+ metadata.gz: e33472807495b87e1584b60af8a8e72682f3caf5cd8ef85c24762db9a7bc1e99e23c72c92f915a917f4923098f4cff15b1811bdec00f45fe1cad690019cd1259
7
+ data.tar.gz: 8adfc3a8d2a3fe9c4a95ffcce1c5c0ce7303c749a0e471754558ce527cbb8f922e9a7854dd390fe69222f886a416fbcb156ee3e71a6e581ad522a13ff9bc32df
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.10.0)
4
+ sportradar-api (0.10.1)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -10,12 +10,12 @@ module Sportradar
10
10
  end
11
11
 
12
12
  def update(data, **opts)
13
- @id = data.dig(0, 'id')
14
- @comment = data.dig(0, 'comment')
15
- @descripton = data.dig(0, 'desc')
16
- @status = data.dig(0, 'status')
17
- @start_date = data.dig(0, 'start_date')
18
- @update_date = data.dig(0, 'update_date')
13
+ @id = data.last&.dig('id')
14
+ @comment = data.last&.dig('comment')
15
+ @descripton = data.last&.dig('desc')
16
+ @status = data.last&.dig('status')
17
+ @start_date = data.last&.dig('start_date')
18
+ @update_date = data.last&.dig('update_date')
19
19
  end
20
20
 
21
21
  def out?
@@ -4,6 +4,18 @@ module Sportradar
4
4
  class Nba
5
5
  class Team < Sportradar::Api::Basketball::Team
6
6
  @all_hash = {}
7
+ def self.new(data, **opts)
8
+ existing = @all_hash[data['id']]
9
+ if existing
10
+ existing.update(data, **opts)
11
+ existing
12
+ else
13
+ @all_hash[data['id']] = super
14
+ end
15
+ end
16
+ def self.all
17
+ @all_hash.values
18
+ end
7
19
 
8
20
  def player_class
9
21
  Player
@@ -4,6 +4,19 @@ module Sportradar
4
4
  class Ncaamb
5
5
  class Team < Sportradar::Api::Basketball::Team
6
6
  @all_hash = {}
7
+ def self.new(data, **opts)
8
+ existing = @all_hash[data['id']]
9
+ binding.pry if data['id'] == "632616c5-2dbb-4017-a449-c9dfc303f026"
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
7
20
 
8
21
  def player_class
9
22
  Player
@@ -6,6 +6,9 @@ module Sportradar
6
6
  def display_type
7
7
  'Timeout'
8
8
  end
9
+ def tv?
10
+ false
11
+ end
9
12
  def timeout?
10
13
  true
11
14
  end
@@ -2,7 +2,9 @@ module Sportradar
2
2
  module Api
3
3
  module Basketball
4
4
  class TvTimeout < Timeout
5
- #
5
+ def tv?
6
+ true
7
+ end
6
8
  end
7
9
  end
8
10
  end
@@ -3,19 +3,6 @@ module Sportradar
3
3
  module Basketball
4
4
  class Team < Data
5
5
  attr_accessor :response, :id, :market, :name, :alias, :full_name, :venue, :records, :player_stats, :team_stats
6
- @all_hash = {}
7
- def self.new(data, **opts)
8
- existing = @all_hash[data['id']]
9
- if existing
10
- existing.update(data, **opts)
11
- existing
12
- else
13
- @all_hash[data['id']] = super
14
- end
15
- end
16
- def self.all
17
- @all_hash.values
18
- end
19
6
 
20
7
  def initialize(data, **opts)
21
8
  @response = data
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.10.0"
3
+ VERSION = "0.10.1"
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.10.0
4
+ version: 0.10.1
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-02-15 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler