Class: Kaseya::VSA::Api
- Inherits:
-
Object
- Object
- Kaseya::VSA::Api
- Defined in:
- lib/kaseya/vsa/api.rb
Direct Known Subclasses
Client::Agents, Client::Alarms, Client::Assets, Client::Logs, Client::MachineGroups, Client::Organizations
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #delete(path) ⇒ Object
- #get_many(path, params = {}) ⇒ Object
- #get_one(path, params = {}) ⇒ Object
-
#initialize(connection) ⇒ Api
constructor
A new instance of Api.
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Api
Returns a new instance of Api.
5 6 7 |
# File 'lib/kaseya/vsa/api.rb', line 5 def initialize(connection) @connection = connection end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
3 4 5 |
# File 'lib/kaseya/vsa/api.rb', line 3 def connection @connection end |
Instance Method Details
#delete(path) ⇒ Object
25 26 27 |
# File 'lib/kaseya/vsa/api.rb', line 25 def delete(path) connection.delete(path) end |
#get_many(path, params = {}) ⇒ Object
9 10 11 |
# File 'lib/kaseya/vsa/api.rb', line 9 def get_many(path, params = {}) Kaseya::Collection.new connection.get(path, params) end |
#get_one(path, params = {}) ⇒ Object
13 14 15 |
# File 'lib/kaseya/vsa/api.rb', line 13 def get_one(path, params = {}) Kaseya::Response.new connection.get(path, params) end |