sportradar-api 0.13.24 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: efcf47e5a6970b82c0795211958c277f99dcf61d
4
- data.tar.gz: 7b786d9ae02be5189fdecad0306621c701bdd3d5
2
+ SHA256:
3
+ metadata.gz: 33784418fb807e49dedec710bc4d07e22165615929f5b379e5b75da16f7a474c
4
+ data.tar.gz: '09071e245846662f1f9f60297fdfac12690746040d8e93705be21bba543f583c'
5
5
  SHA512:
6
- metadata.gz: 4b810969dc532fc4d48ed7e508a8751d6e808bdc0bbafed3030c521cd2c61faa4ca71ec990201bdc28a02beddc7a37a9509bb77c1fd2e21f6d48e515f138492b
7
- data.tar.gz: 39e1ed6c33019876d4bd1b9ad58e0c6fc93149e3f927d049e74ca3ce41d6033615c0c9620414bec1710a3eaa2e5624350e64256e1244cc87e5fe6c898db4be3e
6
+ metadata.gz: b6aa4fc6699921922fc84be63de15569e658baac30506093fe7e250844f51908657e859e70404b55cfe0c8362d945ec19cc5b2c1df3a74711ded681efefea994
7
+ data.tar.gz: d882cba949755f62c7e3885ca8683866e19f59c3fc9c6fd4bf34e95cdd205f1323130f4b6c0d203c96e43ac3e74bf3b44bd2b439ba6753a431712ef151e9a1dd
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.13.24)
4
+ sportradar-api (0.14.0)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.1.4)
11
+ activesupport (5.2.1)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (~> 0.7)
13
+ i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
16
  addressable (2.5.1)
@@ -45,9 +45,9 @@ GEM
45
45
  guard-compat (~> 1.2)
46
46
  minitest (>= 3.0)
47
47
  hashdiff (0.3.4)
48
- httparty (0.15.6)
48
+ httparty (0.16.2)
49
49
  multi_xml (>= 0.5.2)
50
- i18n (0.9.5)
50
+ i18n (1.1.0)
51
51
  concurrent-ruby (~> 1.0)
52
52
  json (2.1.0)
53
53
  listen (3.1.5)
@@ -115,4 +115,4 @@ DEPENDENCIES
115
115
  webmock
116
116
 
117
117
  BUNDLED WITH
118
- 1.15.3
118
+ 1.16.3
@@ -23,7 +23,8 @@ module Sportradar
23
23
  else
24
24
  response = get request_url("#{league}/#{image_type}/players/manifest")
25
25
  end
26
- elsif nfl_premium || usat_premium || sport == 'ncaafb'
26
+ elsif nfl_premium || usat_premium || sport == 'ncaafb' || sport == 'nba'
27
+ year = Date.today.month < 8 ? Date.today.year - 1 : Date.today
27
28
  response = get request_url("#{image_type}/players/#{year}/manifest")
28
29
  else
29
30
  response = get request_url("players/#{image_type}/manifests/all_assets")
@@ -136,6 +137,8 @@ module Sportradar
136
137
  'ap_premium'
137
138
  elsif usat_premium
138
139
  'usat_premium'
140
+ elsif sport == 'nba'
141
+ 'getty_premium'
139
142
  else
140
143
  'usat'
141
144
  # REUTERS IS JUST FOR SOCCER sport == 'mlb' ? 'usat' : 'reuters'
@@ -143,11 +146,12 @@ module Sportradar
143
146
  end
144
147
 
145
148
  def version
146
- if uses_v3_api? || nfl_premium || usat_premium
147
- 3
148
- elsif uses_v2_api?
149
- Sportradar::Api.version('images')
150
- end
149
+ # if uses_v3_api? || nfl_premium || usat_premium || sport == 'nba'
150
+ # 3
151
+ # elsif uses_v2_api?
152
+ # Sportradar::Api.version('images')
153
+ # end
154
+ 3
151
155
  end
152
156
 
153
157
  def image_type
@@ -175,7 +179,7 @@ module Sportradar
175
179
  end
176
180
 
177
181
  def v3_api_sports
178
- ['mlb', 'soccer', 'cricket', 'f1', 'rugby', 'tennis', 'ncaafb', ]
182
+ ['mlb', 'soccer', 'cricket', 'f1', 'rugby', 'tennis', 'ncaafb', 'nba' ]
179
183
  end
180
184
 
181
185
  def soccer_leagues
@@ -96,6 +96,14 @@ module Sportradar
96
96
  @name || [@first_name, @last_name].join(' ')
97
97
  end
98
98
 
99
+ def birth_date
100
+ @date_of_birth
101
+ end
102
+
103
+ def jersey
104
+ @jersey_number
105
+ end
106
+
99
107
  def first_name
100
108
  @name.split()[1]
101
109
  end
@@ -150,6 +150,9 @@ module Sportradar
150
150
  data = api.get_data(path_statistics(tourn_id)).to_h
151
151
  ingest_statistics(data)
152
152
  end
153
+ def get_season_stats(*args)
154
+ get_statistics
155
+ end
153
156
  def ingest_statistics(data)
154
157
  update(data)
155
158
  data
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.13.24"
3
+ VERSION = "0.14.0"
4
4
  end
5
5
  end
@@ -60,7 +60,7 @@ module Sportradar
60
60
  {api: :nascar, version: 3},
61
61
  {api: :odds, version: 1},
62
62
  {api: :content, version: 3},
63
- {api: :images, version: 2},
63
+ {api: :images, version: 3},
64
64
  {api: :live_images, version: 1},
65
65
  {api: :olympics, version: 2},
66
66
  {api: :soccer, version: 3},
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.13.24
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -471,7 +471,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
471
471
  version: '0'
472
472
  requirements: []
473
473
  rubyforge_project:
474
- rubygems_version: 2.6.11
474
+ rubygems_version: 2.7.6
475
475
  signing_key:
476
476
  specification_version: 4
477
477
  summary: Sportradar API client