sportradar-api 0.17.2 → 0.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sportradar/api/soccer/match.rb +16 -0
- data/lib/sportradar/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3100c7fae1d121061288154715bafd7ce98519f68aaf509be26a88ac93d911ad
|
4
|
+
data.tar.gz: 4577f95e101133a34ac55ef7905363d9cb823ce7b845dbf4ebb893b91ce801ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d65cf9b1841d0f7ac9ce1ed5b47b65bb3355a7aa97fad729b7b12529c681b82961556b6da4d2d892e1477e1fb536e058d3b6e916b8547a2424defe98de56aeef
|
7
|
+
data.tar.gz: 572669f4859c38ef8bb507031a0d6335715124c72fd563b4067b290c3a503a8ff1cc7cdf794174ba9e9de5bc5dba68d5b46f2b3bb814f98af915e6da26cfe369
|
data/Gemfile.lock
CHANGED
@@ -55,6 +55,7 @@ module Sportradar
|
|
55
55
|
end
|
56
56
|
|
57
57
|
@scheduled = Time.parse(data['scheduled']) if data['scheduled']
|
58
|
+
@scheduled = Time.parse(data['start_time']) if data['start_time']
|
58
59
|
@start_time_tbd = data['start_time_tbd'] if data.key?('start_time_tbd')
|
59
60
|
@status = data['status'] if data['status']
|
60
61
|
@match_status = data['match_status'] if data['match_status']
|
@@ -66,8 +67,10 @@ module Sportradar
|
|
66
67
|
|
67
68
|
@home_score = data['home_score'] if data['home_score']
|
68
69
|
@away_score = data['away_score'] if data['away_score']
|
70
|
+
@period = parse_period(data['match_status']) if data['match_status']
|
69
71
|
@period = data['period'] if data['period']
|
70
72
|
@match_time = data.dig('clock', 'match_time') if data.dig('clock', 'match_time')
|
73
|
+
@match_time = data.dig('clock', 'played') if data.dig('clock', 'played')
|
71
74
|
@stoppage_time = data.dig('clock', 'stoppage_time')
|
72
75
|
@ball_locations = data['ball_locations'] if data['ball_locations']
|
73
76
|
@winner_id = data['winner_id'] if data['winner_id']
|
@@ -128,6 +131,19 @@ module Sportradar
|
|
128
131
|
@match_status == "halftime"
|
129
132
|
end
|
130
133
|
|
134
|
+
def parse_period(status)
|
135
|
+
case status
|
136
|
+
when '1st_half', 'halftime'
|
137
|
+
1
|
138
|
+
when '2nd_half'
|
139
|
+
2
|
140
|
+
when 'overtime', '1st_extra'
|
141
|
+
3
|
142
|
+
when '2nd_extra'
|
143
|
+
4
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
131
147
|
def postponed?
|
132
148
|
'postponed' == status
|
133
149
|
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.17.
|
4
|
+
version: 0.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Eggett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|