module Gifnoc::TokenClientMethods
Public Instance Methods
create_token(token)
click to toggle source
# File lib/gifnoc/clients/token_client_methods.rb, line 14 def create_token(token) return Gifnoc::Token.from_api_hash(@api.create_token(token.to_api_hash)) end
delete_token(token_uuid)
click to toggle source
# File lib/gifnoc/clients/token_client_methods.rb, line 22 def delete_token(token_uuid) return @api.delete_token(token_uuid) end
get_token(token_uuid)
click to toggle source
# File lib/gifnoc/clients/token_client_methods.rb, line 10 def get_token(token_uuid) return Gifnoc::Token.from_api_hash(@api.get_token(token_uuid)) end
list_tokens()
click to toggle source
# File lib/gifnoc/clients/token_client_methods.rb, line 4 def list_tokens return @api.list_tokens.map do |raw_token| next(Gifnoc::Token.from_api_hash(raw_token)) end end
update_token(token_uuid, token)
click to toggle source
# File lib/gifnoc/clients/token_client_methods.rb, line 18 def update_token(token_uuid, token) return Gifnoc::Token.from_api_hash(@api.update_token(token_uuid, token.to_api_hash)) end