class N2y::YNAB

Included Modules

Defined in:

n2y/ynab.cr
n2y/ynab/account.cr
n2y/ynab/exceptions.cr
n2y/ynab/responses.cr
n2y/ynab/transaction.cr

Constant Summary

HABITAT_SETTINGS = [{decl: client_id : String, example: nil, validation: nil}, {decl: secret : String, example: nil, validation: nil}] of Nil

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(token_pair : N2y::TokenPair) #

[View source]

Class Method Detail

def self.configure(&) #

[View source]
def self.settings #

[View source]

Instance Method Detail

def accounts : Array(Account) #

[View source]
def authorize(code : String, return_uri : URI) #

Authorize the code returned from the redirect.


[View source]
def handle_error_response(response) #

[View source]
def push_transactions(budget_id : String, transactions : Array(Transaction)) #

Push transactions to YNAB, and return the number of duplicated transactions.


[View source]
def redirect_uri(return_uri : URI) #

Get the URI to redirect the user to for authorization.


[View source]
def redirect_uri(return_uri : String) #

[View source]
def request(method : String, path : String, *, query = nil, data = nil, class klass : Responses.class) #

Make request to YNAB. Possibly refreshing tokens if needed.


[View source]
def settings #

[View source]