Method: Transloadit#initialize

Defined in:
lib/transloadit.rb

#initialize(options = {}) ⇒ Transloadit

Creates a new instance of the Transloadit API.

Parameters:

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

    a hash of options, which can be any of:

Options Hash (options):

  • :key (String)

    your auth key from the credentials page (required)

  • :secret (String)

    your auth secret from the credentials page, for signing requests (optional)



46
47
48
49
50
51
52
53
# File 'lib/transloadit.rb', line 46

def initialize(options = {})
  self.key = options[:key]
  self.secret = options[:secret]
  self.duration = options[:duration] || 5 * 60
  self.max_size = options[:max_size]

  _ensure_key_provided
end