Module: Hinoki::Clients
- Defined in:
- lib/hinoki/clients.rb
Class Method Summary collapse
-
.all(limit = nil, offset = nil) ⇒ Object
Retrieves list of all clients.
-
.by_name(client) ⇒ Object
Gets info about a specific client.
-
.delete(client) ⇒ Object
Deletes a client (and resolves its events).
-
.history(client) ⇒ Object
Gets recent history of this client’s status.
Class Method Details
.all(limit = nil, offset = nil) ⇒ Object
Retrieves list of all clients
11 12 13 14 15 16 17 |
# File 'lib/hinoki/clients.rb', line 11 def self.all(limit=nil, offset=nil) url = "/clients" if limit then url.append("?limit=#{limit}") end if offset then url.append("&offset=#{offset}") end return @conn.get(url) end |
.by_name(client) ⇒ Object
Gets info about a specific client
20 21 22 |
# File 'lib/hinoki/clients.rb', line 20 def self.by_name(client) return @conn.get("/clients/#{client}") end |
.delete(client) ⇒ Object
Deletes a client (and resolves its events)
25 26 27 |
# File 'lib/hinoki/clients.rb', line 25 def self.delete(client) return @conn.delete("/clients/#{client}") end |
.history(client) ⇒ Object
Gets recent history of this client’s status
30 31 32 |
# File 'lib/hinoki/clients.rb', line 30 def self.history(client) return @conn.get("/clients/#{client}/history") end |