sportradar-api 0.10.35 → 0.10.36

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: 55dc442a60e0ee9fdc7c1bcdeacfef53afd1f81c
4
- data.tar.gz: e90a8dacc78d12005455516f07dc0725ee4c7611
3
+ metadata.gz: 11a19a012550a488244e58258b18d9ef23877c8e
4
+ data.tar.gz: c2faeb46c9cdc2db6d2a67abc34e917a7d3256e2
5
5
  SHA512:
6
- metadata.gz: 4bf1d7e5519f02e2f2f4f28bca59607dee5e7c299acabaa0eb5fe58ebefc2e17507ed23048e026cfe4792af1985438fbc664b99e05e7c08fd498156fdb6be00c
7
- data.tar.gz: de36c42a52843d2d93391d0dd9ac80b67c0cc01b5ea4a6770ea6e5d81482bfef79a5a0dbe9077d6287ae01de4db5c0b81315fa45f43412cf73a562d67358b57e
6
+ metadata.gz: c3097d7332f8427d989dcbdbe006659f72714fa5d99c290df309e85ce9f32bdedb90de9067bad1c7de18c28a3c89a75b53bf20575545cc130f953d2bd27465f6
7
+ data.tar.gz: 25b2d67f5a1af759832e706e9681b9ea00d140c594f027e980ced6b6f11b2ee590315720434905b98011bfcec2fb4bb775e9e15c51596bdae85ae12357bea571
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.10.35)
4
+ sportradar-api (0.10.36)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -46,7 +46,7 @@ module Sportradar
46
46
  outcome == 'Homerun'
47
47
  end
48
48
  def strikeout?
49
- pitches.last&.count['strikes'] == 3
49
+ pitches.last&.count.dig('strikes') == 3
50
50
  end
51
51
 
52
52
  def update(data, **opts)
@@ -4,7 +4,7 @@ module Sportradar
4
4
  class Game < Data
5
5
  attr_accessor :response, :id, :title, :home_id, :away_id, :score, :status, :coverage, :scheduled, :venue, :broadcast, :duration, :attendance, :team_stats, :player_stats, :changes
6
6
 
7
- attr_reader :inning, :half, :outs, :bases, :pitchers
7
+ attr_reader :inning, :half, :outs, :bases, :pitchers, :final, :rescheduled, :inning_over
8
8
  attr_reader :outcome, :count
9
9
  DEFAULT_BASES = { '1' => nil, '2' => nil, '3' => nil }
10
10
 
@@ -119,6 +119,9 @@ module Sportradar
119
119
  @duration = data['duration'] if data['duration']
120
120
  @attendance = data['attendance'] if data['attendance']
121
121
 
122
+ @final = data['final'] if data['final']
123
+ @rescheduled = data['rescheduled'] if data['rescheduled']
124
+
122
125
  @team_ids = { home: @home_id, away: @away_id}
123
126
 
124
127
  update_bases(data)
@@ -159,7 +162,9 @@ module Sportradar
159
162
  raise e
160
163
  end
161
164
  def advance_inning
165
+ @inning_over = false
162
166
  return unless count['outs'] == 3
167
+ @inning_over = true
163
168
  @bases = DEFAULT_BASES.dup
164
169
  half, inn = if count['inning_half'] == 'B'
165
170
  ['T', count['inning'] += 1]
@@ -2,7 +2,7 @@ module Sportradar
2
2
  module Api
3
3
  module Baseball
4
4
  class Pitch < Data
5
- attr_accessor :response, :id, :at_bat, :outcome_id, :status, :count, :is_ab_over, :warming_up, :runners, :errors, :pitch_type_name, :x, :y, :zone, :total_pitch_count, :speed, :outcome, :hit_type, :balls, :strikes, :outs
5
+ attr_accessor :response, :id, :at_bat, :outcome_id, :status, :count, :is_ab_over, :is_hit, :warming_up, :runners, :errors, :pitch_type_name, :x, :y, :zone, :total_pitch_count, :speed, :outcome, :hit_type, :balls, :strikes, :outs
6
6
 
7
7
  def initialize(data, **opts)
8
8
  @response = data
@@ -217,7 +217,7 @@ module Sportradar
217
217
  'oTT4' => 'Triple - Out at Home',
218
218
  }
219
219
  end
220
-
220
+ {"type"=>"steal", "id"=>"01ead210-1586-4d07-9713-6fd3d17b2b4c", "status"=>"official", "created_at"=>"2017-05-15T23:55:53+00:00", "pitcher"=>{"id"=>"9c12832b-c487-40d4-915b-e44097632d7c"}, "runners"=>[{"id"=>"65de4cd1-ca86-468c-9346-1e68d6279a8e", "starting_base"=>1, "ending_base"=>0, "outcome_id"=>"PO", "out"=>true, "last_name"=>"Gordon", "first_name"=>"Devaris", "preferred_name"=>"Dee", "jersey_number"=>"9", "description"=>"Dee Gordon picked off.", "fielders"=>[{"id"=>"bd519b9f-7539-4282-a741-3bd2bf532c40", "type"=>"putout", "sequence"=>1, "last_name"=>"Gurriel", "first_name"=>"Yulieski", "preferred_name"=>"Yulieski", "jersey_number"=>"10"}, {"id"=>"9c12832b-c487-40d4-915b-e44097632d7c", "type"=>"assist", "sequence"=>1, "last_name"=>"Musgrove", "first_name"=>"Joseph", "preferred_name"=>"Joe", "jersey_number"=>"59"}]}]}
221
221
  end
222
222
  end
223
223
  end
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.10.35"
3
+ VERSION = "0.10.36"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportradar-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.35
4
+ version: 0.10.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett