module Gifnoc::RecordAPIMethods
Public Instance Methods
create_record(namespace_uuid, record_hash)
click to toggle source
# File lib/gifnoc/apis/record_api_methods.rb, line 18 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/gifnoc/apis/record_api_methods.rb, line 34 def delete_record(namespace_uuid, record_key) return with_response_handling do self.class.delete("/namespaces/#{namespace_uuid}/records/#{URI.escape(record_key)}", @options) end end
get_record(namespace_uuid, record_key)
click to toggle source
# File lib/gifnoc/apis/record_api_methods.rb, line 12 def get_record(namespace_uuid, record_key) return with_response_handling do self.class.get("/namespaces/#{namespace_uuid}/records/#{URI.escape(record_key)}", @options) end end
list_records(namespace_uuid)
click to toggle source
# File lib/gifnoc/apis/record_api_methods.rb, line 6 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/gifnoc/apis/record_api_methods.rb, line 26 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/#{URI.escape(record_key)}", options) end end