Class: Bitmovin::Encoding::Manifests::HlsVariantStreamList
- Defined in:
- lib/bitmovin/encoding/manifests/hls_variant_stream_list.rb
Instance Attribute Summary collapse
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
Attributes inherited from Resource
#created_at, #description, #id, #modified_at, #name
Instance Method Summary collapse
- #build(hash = {}) ⇒ Object
-
#initialize(manifest_id) ⇒ HlsVariantStreamList
constructor
A new instance of HlsVariantStreamList.
- #list(limit = 100, offset = 0) ⇒ Object
Methods inherited from Resource
#delete!, find, init, #inspect, list, #persisted?, #save!
Methods included from Helpers
#camelize_hash, #hash_to_struct, result, #result, #underscore_hash
Constructor Details
#initialize(manifest_id) ⇒ HlsVariantStreamList
Returns a new instance of HlsVariantStreamList.
6 7 8 9 10 |
# File 'lib/bitmovin/encoding/manifests/hls_variant_stream_list.rb', line 6 def initialize(manifest_id) @manifest_id = manifest_id self.class.init(File.join("/v1/encoding/manifests/", manifest_id, "streams")) #super(hsh) end |
Instance Attribute Details
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
4 5 6 |
# File 'lib/bitmovin/encoding/manifests/hls_variant_stream_list.rb', line 4 def manifest_id @manifest_id end |
Instance Method Details
#build(hash = {}) ⇒ Object
18 19 20 |
# File 'lib/bitmovin/encoding/manifests/hls_variant_stream_list.rb', line 18 def build(hash = {}) HlsVariantStream.new(@manifest_id, hash) end |
#list(limit = 100, offset = 0) ⇒ Object
12 13 14 15 16 |
# File 'lib/bitmovin/encoding/manifests/hls_variant_stream_list.rb', line 12 def list(limit = 100, offset = 0) path = File.join("/v1/encoding/manifests/hls", @manifest_id, self.class.resource_path) response = Bitmovin.client.get(path, { limit: limit, offset: offset }) result(response)['items'].map { |item| self.class.klass.new(@manifest_id, item) } end |