sportradar-api 0.11.48 → 0.11.49

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: db56337b0670772671660ac65164e99e1a42cc42
4
- data.tar.gz: 88a5c6493b7639ca19f20820b94f64381e9f290b
3
+ metadata.gz: e72821992651ae76b67d4a0c283e9c308477c778
4
+ data.tar.gz: be4afd4e5adfdf6376bc8891ca3765cb0c9a394b
5
5
  SHA512:
6
- metadata.gz: 3381f0a0c7bc62fae3cb1b77612d4d8680511a7b99ede0a017d11737ecfbabd73c9320bff1e8e22048dead13ab890a5067308dd19ab2bbbd6d964b66844fb0f9
7
- data.tar.gz: 6f62a18befe4001f24eaef46539d10d1881e20bdd5222b2c97d91407d747f1380779a0de34fa48fbc05283a88b708c0598afcd863c5be4a56001eef942cbf9ef
6
+ metadata.gz: 4884224e3996a20abfe98272fe0a0aafce88331e97bf8c98a4a566574afa03a9b1085608dc51b1a7b879cfebb50e01fe48716294c2041093909e70ae1fa2bb29
7
+ data.tar.gz: 43819a8dcd02f230a3b10a2a6e7ce64e76e1a37bef7278b9bb12b404fefcf60abd349e96831038f46a2fa3a0ad22b5ba148f044e9a07d2c055d474305ad4489f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.11.48)
4
+ sportradar-api (0.11.49)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -41,6 +41,19 @@ module Sportradar
41
41
  @event_type.nil?
42
42
  end
43
43
 
44
+ def scoring_play?
45
+ case @play_type
46
+ when 'fieldgoal'
47
+ statistics.field_goal&.made?
48
+ when 'extrapoint'
49
+ true # how does a missed PAT come in?
50
+ when 'safety'
51
+ true
52
+ else
53
+ statistics.pass&.touchdown? || statistics.rush&.touchdown?
54
+ end
55
+ end
56
+
44
57
  def event?
45
58
  !play?
46
59
  end
@@ -173,6 +173,10 @@ module Sportradar
173
173
  @player = OpenStruct.new(data['player']) if data['player']
174
174
  end
175
175
 
176
+ def made?
177
+ @missed == 0 && !nullified?
178
+ end
179
+
176
180
  def nullified?
177
181
  @nullified.to_s == 'true'
178
182
  end
@@ -212,6 +216,10 @@ module Sportradar
212
216
  @nullified = data['nullified']
213
217
  end
214
218
 
219
+ def touchdown?
220
+ @touchdown == 1 && !nullified?
221
+ end
222
+
215
223
  def nullified?
216
224
  @nullified.to_s == 'true'
217
225
  end
@@ -314,6 +322,10 @@ module Sportradar
314
322
  @nullified = data['nullified']
315
323
  end
316
324
 
325
+ def touchdown?
326
+ @touchdown == 1 && !nullified?
327
+ end
328
+
317
329
  def nullified?
318
330
  @nullified.to_s == 'true'
319
331
  end
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.11.48"
3
+ VERSION = "0.11.49"
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.11.48
4
+ version: 0.11.49
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-08-28 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler