sportradar-api 0.10.0 → 0.10.1
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/injury.rb +6 -6
- data/lib/sportradar/api/basketball/nba/team.rb +12 -0
- data/lib/sportradar/api/basketball/ncaamb/team.rb +13 -0
- data/lib/sportradar/api/basketball/plays/timeout.rb +3 -0
- data/lib/sportradar/api/basketball/plays/tv_timeout.rb +3 -1
- data/lib/sportradar/api/basketball/team.rb +0 -13
- 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: f4618970da2561389f48e3ab6bcdc5fe8410a042
|
|
4
|
+
data.tar.gz: 4c0398884c90825e73ff8a39f101a49f9c382fef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e33472807495b87e1584b60af8a8e72682f3caf5cd8ef85c24762db9a7bc1e99e23c72c92f915a917f4923098f4cff15b1811bdec00f45fe1cad690019cd1259
|
|
7
|
+
data.tar.gz: 8adfc3a8d2a3fe9c4a95ffcce1c5c0ce7303c749a0e471754558ce527cbb8f922e9a7854dd390fe69222f886a416fbcb156ee3e71a6e581ad522a13ff9bc32df
|
data/Gemfile.lock
CHANGED
|
@@ -10,12 +10,12 @@ module Sportradar
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def update(data, **opts)
|
|
13
|
-
@id = data.dig(
|
|
14
|
-
@comment = data.dig(
|
|
15
|
-
@descripton = data.dig(
|
|
16
|
-
@status = data.dig(
|
|
17
|
-
@start_date = data.dig(
|
|
18
|
-
@update_date = data.dig(
|
|
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
|
|
@@ -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
|
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.
|
|
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-
|
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|