Method: ContextIO#initialize

Defined in:
lib/contextio.rb

#initialize(key, secret, opts = {}) ⇒ ContextIO

Creates a new ContextIO instance and makes a new handle for the API. This is your entry point to your Context.IO account. For a web app, you probably want to instantiate this in some kind of initializer and keep it around for the life of the process.

Parameters:

  • key (String)

    Your OAuth consumer key for your Context.IO account

  • secret (String)

    Your OAuth consumer secret for your Context.IO account

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

    Optional options for OAuth connections. ie. :timeout and :open_timeout are supported



21
22
23
# File 'lib/contextio.rb', line 21

def initialize(key, secret, opts={})
  @api = API.new(key, secret, opts)
end