Class: Bitmovin::Encoding::Inputs::Analysis

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/bitmovin/encoding/inputs/analysis.rb

Instance Method Summary collapse

Methods included from Helpers

#camelize_hash, #hash_to_struct, result, #result, #underscore_hash

Constructor Details

#initialize(input_id) ⇒ Analysis

Returns a new instance of Analysis.



4
5
6
# File 'lib/bitmovin/encoding/inputs/analysis.rb', line 4

def initialize(input_id)
  @id = input_id
end

Instance Method Details

#find(id) ⇒ Object



16
17
18
19
20
# File 'lib/bitmovin/encoding/inputs/analysis.rb', line 16

def find(id)
  path = File.join("/v1/encoding/inputs", @id, "analysis", id)
  response = Bitmovin.client.get(path)
  subtask_hash_to_object(result(response))
end

#list(limit = 100, offset = 0) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/bitmovin/encoding/inputs/analysis.rb', line 8

def list(limit = 100, offset = 0)
  path = File.join("/v1/encoding/inputs/", @id, "analysis")
  response = Bitmovin.client.get(path, limit: limit, offset: offset)
  result(response).map do |result|
    subtask_hash_to_object(result)
  end
end