sportradar-api 0.10.27 → 0.10.28
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.rb +1 -0
- data/lib/sportradar/api/images.rb +1 -0
- data/lib/sportradar/api/images/asset.rb +2 -1
- data/lib/sportradar/api/images/ref.rb +15 -0
- data/lib/sportradar/api/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 448569ea2508fd3390285f94382ff9579280e09e
|
4
|
+
data.tar.gz: 9e5b7cb92b52b9cec3a0d4d30922f50f919d999e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3631dd67efcc81ee1a77baaa2a1b9247760d1c82b1ca9b7d96298306d100ab5de0ecda6f32e60a8562bf73bf1e2a7113913bba7978fca9810557b7175cca0b5
|
7
|
+
data.tar.gz: c0d2cbc6a42d508fbd1fd99f28fcb1a0908e06df9498ca6dbeaea7ad9f61a0f50c82f182dfddccf41fca530bb528b5b9e8a2a79376838a97e78a38db6e50bc33
|
data/Gemfile.lock
CHANGED
data/lib/sportradar/api.rb
CHANGED
@@ -81,6 +81,7 @@ require "sportradar/api/images"
|
|
81
81
|
require "sportradar/api/images/asset_list"
|
82
82
|
require "sportradar/api/images/asset"
|
83
83
|
require "sportradar/api/images/link"
|
84
|
+
require "sportradar/api/images/ref"
|
84
85
|
require "sportradar/api/images/tag"
|
85
86
|
|
86
87
|
require "sportradar/api/mma"
|
@@ -80,6 +80,7 @@ module Sportradar
|
|
80
80
|
|
81
81
|
end
|
82
82
|
alias_method :all_events, :event_manifests
|
83
|
+
alias_method :live_images, :event_manifests
|
83
84
|
|
84
85
|
# The Player Images, Coach Images, Venue Images APIs aren't really meant to be used directly, the manifests return an href path of an image we can pass it into the image_url method to get the entire image url
|
85
86
|
def image_url(href)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Sportradar
|
2
2
|
module Api
|
3
3
|
class Images::Asset < Data
|
4
|
-
attr_accessor :response, :id, :player_id, :created, :updated, :title, :description, :copyright, :links, :tags
|
4
|
+
attr_accessor :response, :id, :player_id, :created, :updated, :title, :description, :copyright, :links, :tags, :refs
|
5
5
|
|
6
6
|
def initialize(data)
|
7
7
|
@response = data
|
@@ -14,6 +14,7 @@ module Sportradar
|
|
14
14
|
@copyright = data["copyright"]
|
15
15
|
@links = parse_into_array(selector: response["links"]["link"], klass: Sportradar::Api::Images::Link) if response["links"] && response["links"]["link"]
|
16
16
|
@tags = parse_into_array(selector: response["tags"]["tag"], klass: Sportradar::Api::Images::Tag) if response["tags"] && response["tags"]["tag"]
|
17
|
+
@refs = parse_into_array(selector: response["refs"]["ref"], klass: Sportradar::Api::Images::Ref) if response["refs"] && response["refs"]["ref"]
|
17
18
|
end
|
18
19
|
|
19
20
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Sportradar
|
2
|
+
module Api
|
3
|
+
class Images::Ref < Data
|
4
|
+
attr_accessor :response, :sportradar_id, :sportsdata_id, :type, :name
|
5
|
+
def initialize(data)
|
6
|
+
@response = data
|
7
|
+
@sportradar_id = data["sportradar_id"]
|
8
|
+
@sportsdata_id = data["sportsdata_id"]
|
9
|
+
@type = data["type"]
|
10
|
+
@name = data["name"]
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
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.
|
4
|
+
version: 0.10.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Eggett
|
@@ -364,6 +364,7 @@ files:
|
|
364
364
|
- lib/sportradar/api/images/asset.rb
|
365
365
|
- lib/sportradar/api/images/asset_list.rb
|
366
366
|
- lib/sportradar/api/images/link.rb
|
367
|
+
- lib/sportradar/api/images/ref.rb
|
367
368
|
- lib/sportradar/api/images/tag.rb
|
368
369
|
- lib/sportradar/api/live_images.rb
|
369
370
|
- lib/sportradar/api/mma.rb
|