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.
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.
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)
budget_response = ynab_api.budgets.get_budgets
budgets = budget_response.data.budgets
budgets.each do |budget|
puts "Budget Name: #{budget.name}"
end
See the examples folder for example usage scenarios.
The following methods are available in this library.
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.
Copyright (c) 2024 You Need A Budget, LLC
Licensed under the Apache-2.0 license