Module: Bitmovin::Encoding::Outputs

Defined in:
lib/bitmovin/encoding/outputs.rb,
lib/bitmovin/encoding/outputs/s3_output.rb,
lib/bitmovin/encoding/outputs/gcs_output.rb

Defined Under Namespace

Classes: GcsOutput, S3Output

Class Method Summary collapse

Class Method Details

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



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/bitmovin/encoding/outputs.rb', line 3

def self.list(limit = 100, offset = 0)
  response = Bitmovin.client.get '/v1/encoding/outputs', { limit: limit, offset: offset }
  result = (JSON.parse(response.body))['data']['result']
  list = result['items'].map do |item|
    case item['type'].downcase
    when "s3"
      S3Output.new(item)
    when "gcs"
      GcsOutput.new(item)
    end
  end
  list
end