Class: Scaled::Resources::Devices
- Inherits:
-
Object
- Object
- Scaled::Resources::Devices
- Defined in:
- lib/scaled/resources/devices.rb
Overview
API wrapper for tailnet devices. API-обгортка для комп‘ютерів (devices) tailnet.
Instance Method Summary collapse
-
#get(device_id) ⇒ Hash, ...
Parsed response.
- #initialize(client) ⇒ void constructor
-
#list(query: nil) ⇒ Hash, ...
Note: uses current client tailnet scope.
Constructor Details
#initialize(client) ⇒ void
10 11 12 |
# File 'lib/scaled/resources/devices.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#get(device_id) ⇒ Hash, ...
Returns parsed response.
24 25 26 |
# File 'lib/scaled/resources/devices.rb', line 24 def get(device_id) @client.get("/device/#{device_id}") end |
#list(query: nil) ⇒ Hash, ...
Note: uses current client tailnet scope. Нотатка: використовує поточний tailnet з client-конфігурації.
18 19 20 |
# File 'lib/scaled/resources/devices.rb', line 18 def list(query: nil) @client.get("/tailnet/#{@client.tailnet}/devices", query: query) end |