YNAB API Ruby Library
This is the Ruby client for the YNAB API.
Please read the YNAB API documentation for an
overview of using the API and a complete list of available resources.
This client is generated using the OpenAPI Generator.
Installation
gem install ynab
Note: The current version of this gem requires Ruby version 3.3 or later. If you are using an older version of Ruby, you can install version 2.1 of this gem.
Usage
To use this client you must
obtain an access token from
your Account Settings page of the YNAB web
app.
require 'ynab'
access_token = ENV['YNAB_ACCESS_TOKEN']
ynab_api = YNAB::API.new(access_token)
plan_response = ynab_api.plans.get_plans
plans = plan_response.data.budgets
plans.each do |plan|
puts "Plan Name: #{plan.name}"
endExamples
See the examples folder for example usage scenarios.
Methods
The following methods are available in this library.
Versioning
The version of this client is defined in the ynab.gemspec file and follows semantic versioning. The version of this client is maintained independently and does not align with the the version of YNAB API itself (which is defined in the OpenAPI spec). To determine which spec version of the YNAB API was used when generating this client you can refer to the "description" in the field in the ynab.gemspec file.
License
Copyright (c) 2024 YNAB
Licensed under the Apache-2.0 license