module Gifnoc::RecordClientMethods
Public Instance Methods
create_record(namespace_uuid, record)
click to toggle source
# File lib/gifnoc/clients/record_client_methods.rb, line 14 def create_record(namespace_uuid, record) return Gifnoc::Record.from_api_hash(@api.create_record(namespace_uuid, record.to_api_hash)) end
delete_record(namespace_uuid, record_key)
click to toggle source
# File lib/gifnoc/clients/record_client_methods.rb, line 22 def delete_record(namespace_uuid, record_key) return @api.delete_record(namespace_uuid, record_key) end
get_record(namespace_uuid, record_key)
click to toggle source
# File lib/gifnoc/clients/record_client_methods.rb, line 10 def get_record(namespace_uuid, record_key) return Gifnoc::Record.from_api_hash(@api.get_record(namespace_uuid, record_key)) end
list_records(namespace_uuid)
click to toggle source
# File lib/gifnoc/clients/record_client_methods.rb, line 4 def list_records(namespace_uuid) return @api.list_records(namespace_uuid).map do |raw_record| next(Gifnoc::Record.from_api_hash(raw_record)) end end
update_record(namespace_uuid, record_key, record)
click to toggle source
# File lib/gifnoc/clients/record_client_methods.rb, line 18 def update_record(namespace_uuid, record_key, record) return Gifnoc::Record.from_api_hash(@api.update_record(namespace_uuid, record_key, record.to_api_hash)) end