Sha256: b483fe43b137ac2de4f2e92f7c2fb4dc751056cd5f0bea2e33083927ebfdc94f

Contents?: true

Size: 820 Bytes

Versions: 84

Compression:

Stored size: 820 Bytes

Contents

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

      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"]
      end

    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
sportradar-api-0.10.7 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.6 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.5 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.4 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.3 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.2 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.1 lib/sportradar/api/images/asset.rb
sportradar-api-0.10.0 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.59 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.58 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.57 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.56 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.55 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.54 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.53 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.52 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.51 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.50 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.49 lib/sportradar/api/images/asset.rb
sportradar-api-0.9.48 lib/sportradar/api/images/asset.rb