Class: Influxdb::Api::Namespaces::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/influxdb/api/namespaces/base.rb

Direct Known Subclasses

ClusterAdmins, Databases, Servers, Shards, WithDatabase

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pathObject

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

#clientObject (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

#allObject



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