Class: Influxdb::Api::Namespaces::Users

Inherits:
WithDatabase show all
Defined in:
lib/influxdb/api/namespaces/users.rb

Instance Attribute Summary

Attributes inherited from WithDatabase

#database_name

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from WithDatabase

#initialize

Methods inherited from Base

#all, #create, #initialize

Constructor Details

This class inherits a constructor from Influxdb::Api::Namespaces::WithDatabase

Instance Method Details

#delete(*_) ⇒ Object



19
20
21
# File 'lib/influxdb/api/namespaces/users.rb', line 19

def delete(*_)
  return_false_if_doesnt_exist('User'){ super }
end

#find(name) ⇒ Object



7
8
9
10
11
12
# File 'lib/influxdb/api/namespaces/users.rb', line 7

def find(name)
  perform_get(resource_path(name))
rescue Influxdb::Api::Client::Errors::BadRequest => e
  raise e unless e.message =~ /Invalid username/
  nil
end

#update(name, attributes) ⇒ Object



14
15
16
17
# File 'lib/influxdb/api/namespaces/users.rb', line 14

def update(name, attributes)
  perform_post(resource_path(name), {}, attributes)
  true
end