README
YNAB API Go Library
This is an UNOFFICIAL Go client for the YNAB API. It covers 100% of the resources made available by the YNAB API.
Installation
go get go.bmvs.io/ynab
Usage
To use this client you must obtain an access token from your My Account page of the YNAB web app.
package main
import (
"fmt"
"go.bmvs.io/ynab"
)
const accessToken = "bf0cbb14b4330-not-real-3de12e66a389eaafe2"
func main() {
c := ynab.NewClient(accessToken)
budgets, err := c.Budget().GetBudgets()
if err != nil {
panic(err)
}
for _, budget := range budgets {
fmt.Println(budget.Name)
// ...
}
}
See the godoc to see all the available methods with example usage.
Development
- Make sure you have Go 1.11 or later installed
- Make sure you have exported
GO111MODULE=on
in your environment to be able do handle dependencies - Run tests with
go test -race ./...
License
BSD-2-Clause
Documentation
Overview ¶
Package ynab implements the client API
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientServicer ¶
type ClientServicer interface { User() *user.Service Budget() *budget.Service Account() *account.Service Category() *category.Service Payee() *payee.Service Month() *month.Service Transaction() *transaction.Service RateLimit() *api.RateLimit }
ClientServicer contract for a client service API
func NewClient ¶
func NewClient(accessToken string) ClientServicer
NewClient facilitates the creation of a new client instance
Directories
Path | Synopsis |
---|---|
Package api implements shared structures and behaviours of the API services
|
Package api implements shared structures and behaviours of the API services |
account
Package account implements account entities and services
|
Package account implements account entities and services |
budget
Package budget implements budget entities and services
|
Package budget implements budget entities and services |
category
Package category implements category entities and services
|
Package category implements category entities and services |
month
Package month implements month entities and services
|
Package month implements month entities and services |
payee
Package payee implements payee entities and services
|
Package payee implements payee entities and services |
transaction
Package transaction implements transaction entities and services
|
Package transaction implements transaction entities and services |
user
Package user implements transaction user and services
|
Package user implements transaction user and services |