A cross-platform .NET client for the YNAB REST API, using the Refit REST library. All REST methods are asynchronous and awaitable.
See the source on GitHub.
- Install the Nuget package or compile the code.
- Import the namespace
YNAB.Rest
. - Create an IApiClient by calling
ApiClientFactory.Create([accessToken])
. - Start coding!
string accessToken = "secret_api_access_token";
var api = ApiClientFactory.Create(accessToken);
var budgetsResponse = await api.GetBudgets();
var budgets = budgetsResponse.Data.Budgets;
All methods return a response object that has a Data
property containing the data from the REST API call. In this example, the response object contains a Data
property that has a Budgets
property with a list of Budgets.
This structure follows the convention of the YNAB REST API.
This is a new project. There are plenty of opportunities for improvement.
GET Budgets, Accounts, Categories, Transactions, Payees, Payee Locations POST/PUT Transactions
GET Months, Scheduled Transactions
This code is licensed under the MIT License. Use of this code requires consent to the terms of the license.