module Gifnoc::AccountClientMethods

Public Instance Methods

create_account() click to toggle source
# File lib/gifnoc/clients/account_client_methods.rb, line 14
def create_account
        raw_result = @api.create_account
        return Gifnoc::Account.from_api_hash(raw_result["account"]), Gifnoc::Token.from_api_hash(raw_result["token"])
end
delete_account(account_uuid) click to toggle source
# File lib/gifnoc/clients/account_client_methods.rb, line 19
def delete_account(account_uuid)
        return @api.delete_account(account_uuid)
end
get_account(account_uuid) click to toggle source
# File lib/gifnoc/clients/account_client_methods.rb, line 10
def get_account(account_uuid)
        return Gifnoc::Account.from_api_hash(@api.get_account(account_uuid))
end
list_accounts() click to toggle source
# File lib/gifnoc/clients/account_client_methods.rb, line 4
def list_accounts
        return @api.list_accounts.map do |raw_account|
                next(Gifnoc::Account.from_api_hash(raw_account))
        end
end