Method: CloudFiles::Connection#initialize

Defined in:
lib/vendor/cloudfiles-1.3.0/cloudfiles/connection.rb

#initialize(authuser, authkey, retry_auth = true) ⇒ Connection

Creates a new CloudFiles::Connection object. Uses CloudFiles::Authentication to perform the login for the connection. The authuser is the Mosso username, the authkey is the Mosso API key.

Setting the optional retry_auth variable to false will cause an exception to be thrown if your authorization token expires. Otherwise, it will attempt to reauthenticate.

This will likely be the base class for most operations.

cf = CloudFiles::Connection.new(MY_USERNAME, MY_API_KEY)


56
57
58
59
60
61
62
63
64
# File 'lib/vendor/cloudfiles-1.3.0/cloudfiles/connection.rb', line 56

def initialize(authuser,authkey,retry_auth = true) 
  @authuser = authuser
  @authkey = authkey
  @retry_auth = retry_auth
  @authok = false
  @http = {}
  @reqlog = []
  CloudFiles::Authentication.new(self)
end