Module: lib/utils

Utilities
Source:

Members

(static) generate_auth_token

Generate authorization token
Source:

Methods

(static) download_archive_url(options)

Returns a URL that when invokes creates an archive and returns it.
Parameters:
Name Type Description
options [Hash]
Source:
Returns:
[String] archive url

(static) download_zip_url()

Returns a URL that when invokes creates an zip archive and returns it.
Source:
See:
  • download_archive_url

(static) option_consume(options, option_name, default_valueopt)

Deletes `option_name` from `options` and return the value if present. If `options` doesn't contain `option_name` the default value is returned.
Parameters:
Name Type Attributes Description
options Object a collection
option_name String the name (key) of the desired value
default_value <optional>
the value to return is option_name is missing
Source:

(static) zip_download_url()

Utility method that uses the deprecated ZIP download API.
Deprecated:
  • Replaced by {download_zip_url} that uses the more advanced and robust archive generation and download API
Source:

(inner) norm_range_value(value) → {Object|String}

Normalize an offset value
Parameters:
Name Type Description
value String a decimal value which may have a 'p' or '%' postfix. E.g. '35%', '0.4p'
Source:
Returns:
a normalized String of the input value if possible otherwise the value itself
Type
Object | String

(inner) process_video_params(param) → {String}

A video codec parameter can be either a String or a Hash.
Parameters:
Name Type Description
param Object vc_[ : : []] or { codec: 'h264', profile: 'basic', level: '3.1' }
Source:
Returns:
: : []] if a Hash was provided or the param if a String was provided. Returns null if param is not a Hash or String
Type
String