The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::YNAB - Wrapper for the YNAB API

VERSION

version 0.02

SYNOPSIS

  use WWW::YNAB;

  my $ynab = WWW::YNAB->new(access_token => 'SECRET');
  my @budgets = $ynab->budgets;

DESCRIPTION

This module is a wrapper around the V1 YNAB API. It follows the API structure quite closely, so the API documentation should be used for information about the data that this module returns. You can find the API documentation at https://api.youneedabudget.com/.

ATTRIBUTES

access_token

Your personal access token. Information about generating a personal access token can be found at https://api.youneedabudget.com/#personal-access-tokens. Required.

base_uri

The base uri for all API requests. Defaults to https://api.youneedabudget.com/v1/. It's unlikely you'll need to change this.

ua

The HTTP user agent to use. Must be compatible with HTTP::Tiny.

METHODS

user

budgets

budget($id, $server_knowledge=undef)

Returns the budget with id $id. The returned budget object will have a server_knowledge method which represents the state of the server when that object was returned. If the $server_knowledge parameter is passed here with a value that came from an object previously returned by this method, this method will only return sub-objects (transactions, accounts, etc.) which have changed since that previous object was generated.

rate_limit

Returns the number of requests in the current rate limit bucket.

knows_rate_limit

Returns true if the current rate limit is known. This will only be true after a request has already been made (since the API currently doesn't provide a way to just request the current rate limit).

total_rate_limit

Returns the total number of requests that will be allowed in the current rate limit bucket.

knows_total_rate_limit

Returns true if the current total rate limit is known. This will only be true after a request has already been made (since the API currently doesn't provide a way to just request the current rate limit).

BUGS/LIMITATIONS

No known bugs.

Please report any bugs to GitHub Issues at https://github.com/doy/www-ynab/issues.

Not all of the API is exposed by this wrapper yet. In particular, these things are missing:

All modification endpoints (this module currently only exposes read-only operations)
The payee location API
OAuth authentication

Patches are greatly appreciated if you are interested in this functionality.

SEE ALSO

https://api.youneedabudget.com/

SUPPORT

You can find this documentation for this module with the perldoc command.

    perldoc WWW::YNAB

You can also look for information at:

AUTHOR

Jesse Luehrs <doy@tozt.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Jesse Luehrs.

This is free software, licensed under:

  The MIT (X11) License