Class: TesoteSdk::V2::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/tesote_sdk/v2/status.rb

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ Status

Returns a new instance of Status.



4
5
6
# File 'lib/tesote_sdk/v2/status.rb', line 4

def initialize(transport)
  @transport = transport
end

Instance Method Details

#status(opts: {}) ⇒ Object

GET /v2/status — note this lives at /api/v2/status (not /api/status).



9
10
11
12
# File 'lib/tesote_sdk/v2/status.rb', line 9

def status(opts: {})
  body = @transport.request('GET', 'status', opts: opts)
  Models::StatusResult.from_hash(body)
end

#whoami(opts: {}) ⇒ Object

GET /v2/whoami



15
16
17
18
# File 'lib/tesote_sdk/v2/status.rb', line 15

def whoami(opts: {})
  body = @transport.request('GET', 'whoami', opts: opts)
  Models::Whoami.from_hash(body)
end