Module: SfCli::Sf::Org::Display
- Included in:
- Core
- 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) ⇒ ConnectionInfo
Returns the org’s connection information.
Instance Method Details
#display(target_org: nil, api_version: nil) ⇒ 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
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/sf_cli/sf/org/display.rb', line 32 def display(target_org: nil, api_version: nil) flags = {:"target-org" => target_org, :"api-version" => api_version} json = exec(__method__, flags: flags, redirection: :null_stderr) ConnectionInfo.new( id: json['result']['id'], access_token: json['result']['accessToken'], alias: json['result']['alias'], instance_url: json['result']['instanceUrl'], user_name: json['result']['username'], api_version: json['result']['apiVersion'], status: json['result']['connectedStatus'] ) end |