Module: DatabasedotcomConsole

Defined in:
lib/databasedotcom_console.rb,
lib/databasedotcom_console/version.rb

Defined Under Namespace

Classes: ScriptRunner

Constant Summary collapse

VERSION =
"0.0.9"

Class Method Summary collapse

Class Method Details

.new_client(host, username, password) ⇒ Object

Create a new client for use with multiple orgs



10
11
12
13
14
15
16
17
18
# File 'lib/databasedotcom_console.rb', line 10

def self.new_client(host, username, password)
  client = Databasedotcom::Client.new(
            :client_id => CLIENT_ID,
            :client_secret => CLIENT_SECRET,
           :host => host
          )
  client.authenticate(:username => username, :password => password)
  client
end

.new_restforce_client(host, username, password) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/databasedotcom_console.rb', line 20

def self.new_restforce_client(host, username, password)
  Restforce.new( 
      :password => password,
      :username => username,
      :client_id => CLIENT_ID,
      :client_secret => CLIENT_SECRET,
      :host => host
    )
end