sportradar-api 0.17.5.pre → 0.17.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sportradar/api/images.rb +4 -3
- data/lib/sportradar/api/odds/README.md +3 -3
- data/lib/sportradar/api/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d9ffed13743016f02a9ac62392123053147496c963fb0aa8b92db56a1049635
|
4
|
+
data.tar.gz: 47ec2f6de533b9fb7e6c2d682d5eafcfa2ced7a24ec6f87650b00a249b2aaaf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 618c909e2c31d13b4a510480ca7a3b7d820a0cc376b88ddee650b2f20257f1f2acbd1fa54f6c93a48d6b6c33726a9fdb13ed3febab29c8f5ca4ad208278be442
|
7
|
+
data.tar.gz: cc10fa981d3cf68d76182cbf9e65cab2b7a6a3bdf2ac1c22c0f51e01c4d712bce154ffdbd40f7bbc3e9c49187a6484a30a8491c9be598010e8766fe84364c875
|
data/Gemfile.lock
CHANGED
@@ -3,7 +3,7 @@ module Sportradar
|
|
3
3
|
module Api
|
4
4
|
class Images < Request
|
5
5
|
attr_accessor :sport, :league, :access_level, :nfl_premium, :usat_premium, :event_id, :date, :live_image_request
|
6
|
-
def initialize( sport, access_level: 't', league: nil, nfl_premium: false, usat_premium: false, event_id: nil, date: nil )
|
6
|
+
def initialize( sport, access_level: 't', league: nil, nfl_premium: false, usat_premium: false, event_id: nil, date: nil, year: nil )
|
7
7
|
raise Sportradar::Api::Error::InvalidSport unless allowed_sports.include? sport
|
8
8
|
@sport = sport
|
9
9
|
raise Sportradar::Api::Error::InvalidLeague unless soccer_leagues.include?(league) || league.nil?
|
@@ -12,6 +12,7 @@ module Sportradar
|
|
12
12
|
@usat_premium = usat_premium
|
13
13
|
@event_id = event_id
|
14
14
|
@date = date.strftime("%Y/%m/%d") if date
|
15
|
+
@yar = year
|
15
16
|
raise Sportradar::Api::Error::InvalidAccessLevel unless allowed_access_levels.include? access_level
|
16
17
|
@access_level = access_level
|
17
18
|
end
|
@@ -24,8 +25,8 @@ module Sportradar
|
|
24
25
|
response = get request_url("#{league}/#{image_type}/players/manifest")
|
25
26
|
end
|
26
27
|
elsif nfl_premium || usat_premium || sport == 'ncaafb' || sport == 'nba'
|
27
|
-
|
28
|
-
response = get request_url("#{image_type}/players/#{
|
28
|
+
request_year = @year || (Date.today.month < 8 ? Date.today.year - 1 : Date.today.year)
|
29
|
+
response = get request_url("#{image_type}/players/#{request_year}/manifest")
|
29
30
|
else
|
30
31
|
response = get request_url("players/#{image_type}/manifests/all_assets")
|
31
32
|
end
|
@@ -44,6 +44,6 @@ outcome = bm.outcomes.first
|
|
44
44
|
# Some links
|
45
45
|
|
46
46
|
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/books.xml?api_key=
|
47
|
-
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/sports/sr:sport:1/competitions.xml?api_key=
|
48
|
-
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/competitions/sr:competition:234/players_props.json?api_key=
|
49
|
-
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/sports.xml?api_key=
|
47
|
+
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/sports/sr:sport:1/competitions.xml?api_key=
|
48
|
+
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/competitions/sr:competition:234/players_props.json?api_key=
|
49
|
+
https://api.sportradar.com/oddscomparison-player-props/trial/v2/en/sports.xml?api_key=
|
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.17.5
|
4
|
+
version: 0.17.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Eggett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -455,9 +455,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
455
455
|
version: '0'
|
456
456
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
457
457
|
requirements:
|
458
|
-
- - "
|
458
|
+
- - ">="
|
459
459
|
- !ruby/object:Gem::Version
|
460
|
-
version:
|
460
|
+
version: '0'
|
461
461
|
requirements: []
|
462
462
|
rubygems_version: 3.0.3.1
|
463
463
|
signing_key:
|