module ConfigStore::RecordAPIMethods
Public Instance Methods
create_record(namespace_uuid, record_hash)
click to toggle source
# File lib/configstore/apis/record_api_methods.rb, line 17 def create_record(namespace_uuid, record_hash) options = {body: record_hash.to_json} options = options.merge(@options) return with_response_handling do self.class.post("/namespaces/#{namespace_uuid}/records", options) end end
delete_record(namespace_uuid, record_key)
click to toggle source
# File lib/configstore/apis/record_api_methods.rb, line 33 def delete_record(namespace_uuid, record_key) return with_response_handling do self.class.delete("/namespaces/#{namespace_uuid}/records/#{CGI.escape(record_key)}", @options) end end
get_record(namespace_uuid, record_key)
click to toggle source
# File lib/configstore/apis/record_api_methods.rb, line 11 def get_record(namespace_uuid, record_key) return with_response_handling do self.class.get("/namespaces/#{namespace_uuid}/records/#{CGI.escape(record_key)}", @options) end end
list_records(namespace_uuid)
click to toggle source
# File lib/configstore/apis/record_api_methods.rb, line 5 def list_records(namespace_uuid) return with_response_handling do self.class.get("/namespaces/#{namespace_uuid}/records", @options) end end
update_record(namespace_uuid, record_key, record_hash)
click to toggle source
# File lib/configstore/apis/record_api_methods.rb, line 25 def update_record(namespace_uuid, record_key, record_hash) options = {body: record_hash.to_json} options = options.merge(@options) return with_response_handling do self.class.put("/namespaces/#{namespace_uuid}/records/#{CGI.escape(record_key)}", options) end end