class Bitmovin::Encoding::Manifests::List
Attributes
klass[R]
resource_path[R]
manifest_id[RW]
Public Class Methods
init(path, klass)
click to toggle source
# File lib/bitmovin/encoding/manifests/list.rb, line 6 def init(path, klass) @resource_path = path @klass = klass end
new(manifest_id)
click to toggle source
# File lib/bitmovin/encoding/manifests/list.rb, line 15 def initialize(manifest_id) @manifest_id = manifest_id end
Public Instance Methods
add(stream)
click to toggle source
# File lib/bitmovin/encoding/manifests/list.rb, line 25 def add(stream) raise "Not implemented yet. Please use #build and Stream#save! for the time being" end
build(hash = {})
click to toggle source
# File lib/bitmovin/encoding/manifests/list.rb, line 29 def build(hash = {}) self.class.klass.new(@manifest_id, hash) end
find(id)
click to toggle source
# File lib/bitmovin/encoding/manifests/list.rb, line 33 def find(id) path = File.join("/v1/encoding/manifests/", @manifest_id, self.class.resource_path, id) response = Bitmovin.client.get(path) self.class.klass.new(@manifest_id, result(response)) end
list(limit = 100, offset = 0)
click to toggle source
# File lib/bitmovin/encoding/manifests/list.rb, line 19 def list(limit = 100, offset = 0) path = File.join("/v1/encoding/manifest/", @manifest_id, self.class.resource_path) response = Bitmovin.client.get(path, { limit: limit, offset: offset }) result(response)['items'].map { |item| self.class.klass.new(@encoding_id, item) } end