Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/toggl/go-freshbooks

This project implements a golang client library for the Freshbooks API
https://github.com/toggl/go-freshbooks

backend

Last synced: 3 months ago
JSON representation

This project implements a golang client library for the Freshbooks API

Awesome Lists containing this project

README

        

go-freshbooks
=====
This project implements a [Go](http://golang.org) client library for the [freshbooks API](http://developers.freshbooks.com/).
Supports token-based and OAuth authentication.

Example usage
---------------

```go
api := freshbooks.NewApi("<>", "<>")

users, err := api.Users()
tasks, err := api.Tasks()
clients, err := api.Clients()
projects, err := api.Projects()
```

OAuth authentication
---------------
The FreshBooks API also supports OAuth to authorize applications. [oauthplain](https://github.com/tambet/oauthplain) package is used to generate 'Authorization' headers.

```go
token := &oauthplain.Token{
ConsumerKey: "<>",
ConsumerSecret: "<>",
OAuthToken: "<>",
OAuthTokenSecret: "<>",
}

api := freshbooks.NewApi("<>", token)
```