sportradar-api 0.10.33 → 0.10.34

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: c568188785be3496f3746fd92f79ec4f882d2db4
4
- data.tar.gz: 120abf77c0a35ea643913e55bf42cf3304a1826e
3
+ metadata.gz: 2145d1fbce394005f1424a3d185a24470b7d16f4
4
+ data.tar.gz: b7b2dfaa4a4ce9633c7fd1c40936037d1c3e7d90
5
5
  SHA512:
6
- metadata.gz: 8e32c23ebe284c2f93b01b0ad81742b4ef78b1aca6903cc3f7256c2c0e5b812b997483c070d0b359429cb58a71945dbe5257abf372fc7ffe21d5218a4bde9d88
7
- data.tar.gz: b721f8a5001c99ae2f58c5707f144995c59af1360bcca419a8e1dce3b6ee167b7f6352d03d33f09b44ce6c0522a86ec7787c569b201ff4ce41355507caf4d741
6
+ metadata.gz: ce7e9f7881951ebf3038a1835d0bd396051d836ac78a282772f43cc6523dfb32083d8d685d97d043cfa3c827e585e500e01041dd8bc669072db0ce85b82157a0
7
+ data.tar.gz: 22b55dde012d9eeafeab345fad7c5db628fc4a51378e0917e6796ea68a38458efa3ae30f522c2e258b808a503d0eb8c1979569fe1617b4493954a1ad75fb5163
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.10.33)
4
+ sportradar-api (0.10.34)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -52,6 +52,7 @@ module Sportradar
52
52
  def update(data, **opts)
53
53
  @description = data['description'] if data['description']
54
54
  @hitter_id = data['hitter_id'] if data['hitter_id']
55
+ @pitcher_id = data['pitcher_id'] if data['pitcher_id']
55
56
  # this hasn't been checked yet
56
57
  # pitch events
57
58
  create_data(@pitches_hash, data.dig('events'), klass: Pitch, api: @api, at_bat: self)
@@ -62,7 +63,7 @@ module Sportradar
62
63
  end
63
64
 
64
65
  def over?
65
- pitches.last.is_ab_over
66
+ pitches.last&.is_ab_over
66
67
  end
67
68
 
68
69
  def pitches
@@ -3,17 +3,19 @@ module Sportradar
3
3
  module Baseball
4
4
  class Event
5
5
  class WarmingUp < Data
6
- attr_accessor :response, :id, :hitter_id, :outcome, :description
6
+ attr_accessor :response, :id, :first_name, :last_name, :player_id
7
7
 
8
8
  def initialize(data, **opts)
9
- @response = data
9
+ @response = data
10
10
  # @api = opts[:api]
11
11
  # @half_inning = opts[:half_inning]
12
- @event = opts[:event]
13
-
14
- @id = data["id"]
15
- @type = data['type']
16
-
12
+ @event = opts[:event]
13
+ @id = data["id"]
14
+ @type = data['type']
15
+ @first_name = data['first_name'] if data['first_name']
16
+ @last_name = data['last_name'] if data['last_name']
17
+ @player_id = data['player_id'] if data['player_id']
18
+ @preferred_name = data['preferred_name'] if data['preferred_name']
17
19
  update(data)
18
20
  end
19
21
 
@@ -403,7 +403,7 @@ __END__
403
403
  # g = mlb.games.first
404
404
  # g = Sportradar::Api::Baseball::Game.new('id' => "8cd71519-429f-4461-88a2-8a0e134eb89b")
405
405
  g = Sportradar::Api::Baseball::Game.new('id' => "9d0fe41c-4e6b-4433-b376-2d09ed39d184");
406
- g = Sportradar::Api::Baseball::Game.new('id' => "0ab634d3-ce6c-4a79-be8d-b62b0ee506d5");
406
+ g = Sportradar::Api::Baseball::Game.new('id' => "fe9f37fd-6848-4a32-a999-9655044b7319");
407
407
  res = g.get_pbp;
408
408
  res = g.get_summary;
409
409
  res = g.get_box # probably not as useful as summary
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.10.33"
3
+ VERSION = "0.10.34"
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.10.33
4
+ version: 0.10.34
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-05-13 00:00:00.000000000 Z
11
+ date: 2017-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -461,7 +461,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
461
461
  version: '0'
462
462
  requirements: []
463
463
  rubyforge_project:
464
- rubygems_version: 2.5.2
464
+ rubygems_version: 2.6.10
465
465
  signing_key:
466
466
  specification_version: 4
467
467
  summary: Sportradar API client