Class: Sportradar::Api::Images::AssetList

Inherits:
Data
  • Object
show all
Defined in:
lib/sportradar/api/images/asset_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Data

#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data

Constructor Details

#initialize(data) ⇒ AssetList

Returns a new instance of AssetList.



6
7
8
9
10
11
# File 'lib/sportradar/api/images/asset_list.rb', line 6

def initialize(data)
  @response = data
  @type = data["type"]
  @sport = data["sport"]
  @assets = parse_into_array(selector: response["asset"], klass: Sportradar::Api::Images::Asset)  if response["asset"]
end

Instance Attribute Details

#assetsObject

Returns the value of attribute assets.



4
5
6
# File 'lib/sportradar/api/images/asset_list.rb', line 4

def assets
  @assets
end

#responseObject

Returns the value of attribute response.



4
5
6
# File 'lib/sportradar/api/images/asset_list.rb', line 4

def response
  @response
end

#sportObject

Returns the value of attribute sport.



4
5
6
# File 'lib/sportradar/api/images/asset_list.rb', line 4

def sport
  @sport
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/sportradar/api/images/asset_list.rb', line 4

def type
  @type
end