module Bitmovin::Encoding::Inputs

Public Class Methods

list(limit = 100, offset = 0) click to toggle source
# File lib/bitmovin/encoding/inputs.rb, line 3
def Inputs.list(limit = 100, offset = 0)
  response = Bitmovin.client.get '/v1/encoding/inputs', { limit: limit, offset: offset }
  result = (JSON.parse(response.body))['data']['result']
  list = result['items'].map do |item|
    case item['type'].downcase
    when "s3"
      S3Input.new(item)
    when "gcs"
      GcsInput.new(item)
    when "http"
      HttpInput.new(item)
    when "https"
      HttpsInput.new(item)
    when "aspera"
      AsperaInput.new(item)
    when "rtmp"
      RtmpInput.new(item)
    when "generic-s3"
      GenericS3Input.new(item)
    when "azure"
      AzureInput.new(item)
    when "ftp"
      FtpInput.new(item)
    when "sftp"
      SftpInput.new(item)
    end
  end
  list
end