sportradar-api 0.11.63 → 0.11.64

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: d628cad4d8d0ab8feeb2de100329163a9b068287
4
- data.tar.gz: 601ce9b1d0ec71af0c737cc404f7a6a97537ccbd
3
+ metadata.gz: 4966a3e98822f0addc6a0ccfa1111ecb4ce58222
4
+ data.tar.gz: ac70e594f57b501ce29dd2db4005cdea67f110cc
5
5
  SHA512:
6
- metadata.gz: a0ad2500d96e00d701485216775e7e187976acec483b708548c6d8cb8f6911def23229c9f3d15a3c6bb3558effe747c94febdfee636371253155836685fb02eb
7
- data.tar.gz: 7b4c86f05e859b410b68ae106f53561d60f6f6be22f356e0149ca010fc995d9f3d8e455e22bca79fb1fb88bf0ca7029e91031d0fba6c6ff7560791987bcc816a
6
+ metadata.gz: b9d8d3057df0ede540cf34d9c04066d5d25ea7ba398def89146f6f49f20dd9e93c46e73490c870e428a0e722cd193d3b3097335bec16b928572b7520474c995c
7
+ data.tar.gz: c9af893d5859cf680f5225466a687202f2e3ec860a3ace8138c526ca135fbafd1cbca361a0a6fc3bd95712be0be1b38a3e9cc396089cb80ef7af1ade72c8cfdf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.11.63)
4
+ sportradar-api (0.11.64)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -66,16 +66,11 @@ module Sportradar
66
66
  end
67
67
 
68
68
  def parse_from_pbp(data)
69
- # period_name = data.key?('quarter') ? 'quarter' : 'half'
70
- # period_name = 'periods'
71
- # return {} unless data[period_name] # game hasn't started
72
- # quarters = data[period_name]#[1..-1]
73
- # overtimes = data['overtime']
74
- # overtimes = [overtimes] if !overtimes.is_a?(Array)
75
- # quarters = quarters[0] if (quarters.is_a?(Array) && (quarters.size == 1) && quarters.first.is_a?(Array))
76
- # data = (quarters + overtimes).compact.map{|q| q['scoring'] }
77
- # data.map.with_index(1) { |h, i| [i, { h.dig('home', 'id') => h.dig('home', 'points').to_i, h.dig('away', 'id') => h.dig('away', 'points').to_i }] }.to_h
78
- {}
69
+ return {} unless data['periods']
70
+ quarters = data['periods']
71
+ overtimes = Array(data['overtime'])
72
+ data = (quarters + overtimes).compact.map{|q| q['scoring'] }
73
+ data.map.with_index(1) { |h, i| [i, { h.dig('home', 'id') => h.dig('home', 'points').to_i, h.dig('away', 'id') => h.dig('away', 'points').to_i }] }.to_h
79
74
  end
80
75
 
81
76
  # def period_name
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.11.63"
3
+ VERSION = "0.11.64"
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.11.63
4
+ version: 0.11.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett