Module: ConfigStore::NamespaceAPIMethods

Included in:
API
Defined in:
lib/configstore/apis/namespace_api_methods.rb

Instance Method Summary collapse

Instance Method Details

#create_namespace(namespace_hash) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/configstore/apis/namespace_api_methods.rb', line 16

def create_namespace(namespace_hash)
	options = {body: namespace_hash.to_json}
	options = options.merge(@options)
	return with_response_handling do
		self.class.post("/namespaces", options)
	end
end

#delete_namespace(namespace_uuid) ⇒ Object



32
33
34
35
36
# File 'lib/configstore/apis/namespace_api_methods.rb', line 32

def delete_namespace(namespace_uuid)
	return with_response_handling do
		self.class.delete("/namespaces/#{namespace_uuid}", @options)
	end
end

#get_namespace(namespace_uuid) ⇒ Object



10
11
12
13
14
# File 'lib/configstore/apis/namespace_api_methods.rb', line 10

def get_namespace(namespace_uuid)
	return with_response_handling do
		self.class.get("/namespaces/#{namespace_uuid}", @options)
	end
end

#list_namespacesObject



4
5
6
7
8
# File 'lib/configstore/apis/namespace_api_methods.rb', line 4

def list_namespaces
	return with_response_handling do
		self.class.get("/namespaces", @options)
	end
end

#update_namespace(namespace_uuid, namespace_hash) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/configstore/apis/namespace_api_methods.rb', line 24

def update_namespace(namespace_uuid, namespace_hash)
	options = {body: namespace_hash.to_json}
	options = options.merge(@options)
	return with_response_handling do
		self.class.put("/namespaces/#{namespace_uuid}", options)
	end
end