module Gifnoc::TokenAPIMethods
Public Instance Methods
create_token(token_hash)
click to toggle source
# File lib/gifnoc/apis/token_api_methods.rb, line 16 def create_token(token_hash) options = {body: token_hash.to_json} options = options.merge(@options) return with_response_handling do self.class.post("/tokens", options) end end
delete_token(token_uuid)
click to toggle source
# File lib/gifnoc/apis/token_api_methods.rb, line 32 def delete_token(token_uuid) return with_response_handling do self.class.delete("/tokens/#{token_uuid}", @options) end end
get_token(token_uuid)
click to toggle source
# File lib/gifnoc/apis/token_api_methods.rb, line 10 def get_token(token_uuid) return with_response_handling do self.class.get("/tokens/#{token_uuid}", @options) end end
list_tokens()
click to toggle source
# File lib/gifnoc/apis/token_api_methods.rb, line 4 def list_tokens return with_response_handling do self.class.get("/tokens", @options) end end
update_token(token_uuid, token_hash)
click to toggle source
# File lib/gifnoc/apis/token_api_methods.rb, line 24 def update_token(token_uuid, token_hash) options = {body: token_hash.to_json} options = options.merge(@options) return with_response_handling do self.class.put("/tokens/#{token_uuid}", options) end end