Class: TesoteSdk::V1::Status
- Inherits:
-
Object
- Object
- TesoteSdk::V1::Status
- Defined in:
- lib/tesote_sdk/v1/status.rb
Overview
GET /status, GET /whoami — both live under the API root, NOT under /v1. We bypass the transport’s version_segment by using opts is not enough; we need an absolute path. The transport joins base_url + version_segment + path, so we send a leading double-slash path? No — instead we use an unversioned subclient via raw_request.
Instance Method Summary collapse
-
#initialize(transport) ⇒ Status
constructor
A new instance of Status.
-
#status(opts: {}) ⇒ Object
GET /status (no auth required, but transport always sends it — server ignores when not required).
-
#whoami(opts: {}) ⇒ Object
GET /whoami.
Constructor Details
#initialize(transport) ⇒ Status
Returns a new instance of Status.
9 10 11 |
# File 'lib/tesote_sdk/v1/status.rb', line 9 def initialize(transport) @transport = transport end |
Instance Method Details
#status(opts: {}) ⇒ Object
GET /status (no auth required, but transport always sends it — server ignores when not required).
15 16 17 18 |
# File 'lib/tesote_sdk/v1/status.rb', line 15 def status(opts: {}) body = @transport.request_unversioned('GET', 'status', opts: opts) Models::StatusResult.from_hash(body) end |