class BBC::Redux::Asset
@example Properties of the asset object
asset = redux_client.asset('5966413090093319525') asset.channel #=> BBC::Redux::Channel asset.description #=> String asset.duration #=> Integer asset.key #=> BBC::Redux::Key asset.name #=> String asset.pcrid #=> BBC::Redux::Crid asset.reference #=> String asset.scrid #=> BBC::Redux::Crid asset.start #=> DateTime asset.uuid #=> String
@example Generating urls for the asset's associated media files
asset.dvbsubs_url #=> BBC::Redux::MediaUrl asset.flv_url #=> BBC::Redux::MediaUrl asset.h264_hi_url #=> BBC::Redux::MediaUrl asset.h264_lo_url #=> BBC::Redux::MediaUrl asset.mp3_url #=> BBC::Redux::MediaUrl asset.ts_url #=> BBC::Redux::MediaUrl asset.ts_stripped_url #=> BBC::Redux::MediaUrl
@author Matt Haynes <matt.haynes@bbc.co.uk>
Private Class Methods
has_media_url(type)
click to toggle source
# File lib/bbc/redux/asset.rb, line 104 def self.has_media_url(type) define_method(:"#{type}_url") do MediaUrl.new(reference, type, key) end end
Public Instance Methods
key()
click to toggle source
@!attribute [r] key @return [Key] the asset's access key object
# File lib/bbc/redux/asset.rb, line 86 def key @key ||= Key.new(access_key) end
pcrid()
click to toggle source
@!attribute [r] pcrid @return [Key] the asset's programme crid
# File lib/bbc/redux/asset.rb, line 92 def pcrid @pcrid ||= crids.find { |c| c.description =~ /programme/ } end
scrid()
click to toggle source
@!attribute [r] scrid @return [Key] the asset's series crid
# File lib/bbc/redux/asset.rb, line 98 def scrid @scrid ||= crids.find { |c| c.description =~ /series/ } end