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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42f09e13e26bcfdc98d3ee5667ff48ccbe5d4bb4f8a22211a656900bed27e0b2
4
- data.tar.gz: ef713aa823ce1ae9915d0737712419fadab22aaa0a39b5b3aa9a77e9749e0f88
3
+ metadata.gz: 3100c7fae1d121061288154715bafd7ce98519f68aaf509be26a88ac93d911ad
4
+ data.tar.gz: 4577f95e101133a34ac55ef7905363d9cb823ce7b845dbf4ebb893b91ce801ac
5
5
  SHA512:
6
- metadata.gz: 153e6dccc970740be76223537ebeaf7bcda8370d836e1faf7118721fb2277c3f7609fa7adf26f19016c4fc5cd50350cd4bb9c6477ee8f979c2a300c8b6e669aa
7
- data.tar.gz: 7ae13ca0769f69bd3cb547a20ce988ecd77531ee4c7214cfccd34ff06b257b578fa29b1c60da8a69819ef7be96ecb2190fb89c86353bd5a97d2971d1f19a5e12
6
+ metadata.gz: d65cf9b1841d0f7ac9ce1ed5b47b65bb3355a7aa97fad729b7b12529c681b82961556b6da4d2d892e1477e1fb536e058d3b6e916b8547a2424defe98de56aeef
7
+ data.tar.gz: 572669f4859c38ef8bb507031a0d6335715124c72fd563b4067b290c3a503a8ff1cc7cdf794174ba9e9de5bc5dba68d5b46f2b3bb814f98af915e6da26cfe369
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.17.2)
4
+ sportradar-api (0.17.3)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.17.2"
3
+ VERSION = "0.17.3"
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.17.2
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-05 00:00:00.000000000 Z
11
+ date: 2022-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler