Class: Bitmovin::Output

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/bitmovin/output.rb

Overview

Represents a bitmovin Output

Constant Summary collapse

ATTRIBUTES =
i{
  output_id
  type
  name
  bucket
  region
  access_key
  secret_key
  
  
  container
  prefix
  make_public
  create_sub_directory
  created_at
}

Constants included from Helpers

Helpers::S3_BUCKET_IN_URL_REGEX, Helpers::S3_BUCKET_SUBDOMAIN_REGEX, Helpers::S3_OBJECT_KEY_IN_URL_REGEX, Helpers::S3_OBJECT_KEY_SUBDOMAIN_REGEX

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#deep_camelize_keys, #deep_underscore_keys, #extract_bucket, #extract_object_key, #prepare_request_json, #prepare_response_json

Constructor Details

#initialize(params = {}) ⇒ Output

Returns a new instance of Output.

Parameters:

  • params (Hash) (defaults to: {})

    Output details

Options Hash (params):

  • :type (String)

    Type of Output

  • :name (String)

    Name of output profile

  • :bucket (String)

    S3 Bucket name for s3 output

  • :region (String) — default: 'us-east-1'

    S3 region of bucket, required for S3 outputs

  • :access_key (String)

    S3/GCS Access Key, required for S3 outputs

  • :secret_key (String)

    S3/GCS Secret key, required for S3 outputs

  • :account_name (String)

    MS Azure account name, required for Azure outputs

  • :account_key (String)

    MS Azure account key, required for Azure outputs

  • :container (String)

    Name of Azure storage container

  • :prefix (String)

    Virtual sub-directory for file

  • :make_public (Boolean)

    If true, all transfered files can be accessed by their respective URL from anyone

  • :create_sub_directory (Boolean) — default: true

    if true, create a sub directory for your job (<job_id>_<hash>)



55
56
57
# File 'lib/bitmovin/output.rb', line 55

def initialize(params={})
  @details = params
end

Class Method Details

.create(params = {}) ⇒ Bitmovin::Output

Creates a new bitmovin output

Parameters:

Returns:



66
67
68
# File 'lib/bitmovin/output.rb', line 66

def self.create(params={})
  new(params).create
end

Instance Method Details

#createBitmovin::Input

Creates a new bitmovin output with params given within initialization

Returns:



74
75
76
# File 'lib/bitmovin/output.rb', line 74

def create
  make_create_request
end

#details(reload = false) ⇒ Hash

Get bitmovin input details

Parameters:

  • reload (Boolean) (defaults to: false)

    force data reload from server

Returns:

  • (Hash)

    output data as a ruby hash



82
83
84
85
86
# File 'lib/bitmovin/output.rb', line 82

def details(reload = false)
  return @details if !reload && @details

  reload_details
end