Class: Influxdb::Api::Namespaces::Base
- Inherits:
-
Object
- Object
- Influxdb::Api::Namespaces::Base
- Defined in:
- lib/influxdb/api/namespaces/base.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
._resource_path ⇒ Object
Returns the value of attribute _resource_path.
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #all ⇒ Object
- #create(attributes) ⇒ Object
- #delete(name) ⇒ Object
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(client) ⇒ Base
Returns a new instance of Base.
17 18 19 |
# File 'lib/influxdb/api/namespaces/base.rb', line 17 def initialize(client) @client = client end |
Class Attribute Details
._resource_path ⇒ Object
Returns the value of attribute _resource_path.
8 9 10 |
# File 'lib/influxdb/api/namespaces/base.rb', line 8 def _resource_path @_resource_path end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/influxdb/api/namespaces/base.rb', line 5 def client @client end |
Instance Method Details
#all ⇒ Object
21 22 23 |
# File 'lib/influxdb/api/namespaces/base.rb', line 21 def all perform_get(resource_path) end |
#create(attributes) ⇒ Object
25 26 27 28 |
# File 'lib/influxdb/api/namespaces/base.rb', line 25 def create(attributes) perform_post(resource_path, {}, attributes) true end |
#delete(name) ⇒ Object
30 31 32 33 |
# File 'lib/influxdb/api/namespaces/base.rb', line 30 def delete(name) perform_delete(resource_path(name)) true end |