Sha256: 1a89a45631b32a807db4dfab628cbcb95448e23fc0bf0e2118450017b0f16dbd

Contents?: true

Size: 980 Bytes

Versions: 156

Compression:

Stored size: 980 Bytes

Contents

module Sportradar
  module Api
    class Images::Asset < Data
      attr_accessor :response, :id, :player_id, :created, :updated, :title, :description, :copyright, :links, :tags, :refs

      def initialize(data)
        @response = data
        @id = data["id"]
        @player_id = data["player_id"]
        @created = data["created"]
        @updated = data["updated"]
        @title = data["title"]
        @description = data["description"]
        @copyright = data["copyright"]
        @links = parse_into_array(selector: response["links"]["link"], klass: Sportradar::Api::Images::Link)  if response["links"] && response["links"]["link"]
        @tags = parse_into_array(selector: response["tags"]["tag"], klass: Sportradar::Api::Images::Tag)  if response["tags"] && response["tags"]["tag"]
        @refs = parse_into_array(selector: response["refs"]["ref"], klass: Sportradar::Api::Images::Ref)  if response["refs"] && response["refs"]["ref"]
      end

    end
  end
end

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/images/asset.rb
sportradar-api-0.20.1 lib/sportradar/api/images/asset.rb
sportradar-api-0.20.0 lib/sportradar/api/images/asset.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/images/asset.rb
sportradar-api-0.20.0.pre lib/sportradar/api/images/asset.rb
sportradar-api-0.19.6 lib/sportradar/api/images/asset.rb
sportradar-api-0.19.5 lib/sportradar/api/images/asset.rb
sportradar-api-0.19.4 lib/sportradar/api/images/asset.rb
sportradar-api-0.19.3 lib/sportradar/api/images/asset.rb
sportradar-api-0.19.2 lib/sportradar/api/images/asset.rb
sportradar-api-0.19.1 lib/sportradar/api/images/asset.rb
sportradar-api-0.19.0 lib/sportradar/api/images/asset.rb
sportradar-api-0.18.1 lib/sportradar/api/images/asset.rb
sportradar-api-0.18.0 lib/sportradar/api/images/asset.rb
sportradar-api-0.17.6 lib/sportradar/api/images/asset.rb
sportradar-api-0.17.5 lib/sportradar/api/images/asset.rb
sportradar-api-0.17.5.pre lib/sportradar/api/images/asset.rb
sportradar-api-0.17.4 lib/sportradar/api/images/asset.rb
sportradar-api-0.17.3 lib/sportradar/api/images/asset.rb
sportradar-api-0.17.2 lib/sportradar/api/images/asset.rb