Module: SfCli::Sf::Org::Display
- Defined in:
- lib/sf_cli/sf/org/display.rb
Defined Under Namespace
Classes: ConnectionInfo
Instance Method Summary collapse
-
#display(target_org: nil, api_version: nil, raw_output: false) ⇒ ConnectionInfo
Returns the org’s connection information.
Instance Method Details
#display(target_org: nil, api_version: nil, raw_output: false) ⇒ ConnectionInfo
Note:
this function returns the org information including security sensitive things such as access token, username and so on.
Returns the org’s connection information
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/sf_cli/sf/org/display.rb', line 33 def display(target_org: nil, api_version: nil, raw_output: false) flags = {:"target-org" => target_org, :"api-version" => api_version} output = org_exec(__method__, flags: flags, redirection: :null_stderr, raw_output: raw_output) return output if raw_output ConnectionInfo.new( id: output['result']['id'], access_token: output['result']['accessToken'], alias: output['result']['alias'], instance_url: output['result']['instanceUrl'], user_name: output['result']['username'], api_version: output['result']['apiVersion'], status: output['result']['connectedStatus'] ) end |