ynab

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2018 License: BSD-2-Clause Imports: 14 Imported by: 0

README

YNAB API Go Library

GoDoc Reference Build Status Build status Coverage Status

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

  • Install dependencies with dep
  • Run tests with go test -race ./...

License

BSD-2-Clause

Documentation

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
}

ClientServicer contract for a client service API

func NewClient

func NewClient(accessToken string) ClientServicer

NewClient facilitates the creation of a new client instance

Example
package main

import (
	"go.bmvs.io/ynab"
)

func main() {
	c := ynab.NewClient("<valid_ynab_access_token>")
	c.User().GetUser()
}
Output:

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL