Method: FileboundClient::Client.connect

Defined in:
lib/filebound_client.rb

.connect(config) ⇒ FileboundClient::Client

Creates, initialize and logs into the Filebound API

Parameters:

  • config (Hash)

    a hash of configuration values

Returns:

Raises:



27
28
29
30
31
# File 'lib/filebound_client.rb', line 27

def self.connect(config)
  connection = FileboundClient::Connection.build_connection(config)
  raise FileboundClientException.new('Failed to login', 401) unless connection.
  new(connection)
end