This project implements a Go client library for the freshbooks API. Supports token-based and OAuth authentication.
api := freshbooks.NewApi("<<AccountName>>", "<<AuthToken>>")
users, err := api.Users()
tasks, err := api.Tasks()
clients, err := api.Clients()
projects, err := api.Projects()
The FreshBooks API also supports OAuth to authorize applications. oauthplain package is used to generate 'Authorization' headers.
token := &oauthplain.Token{
ConsumerKey: "<<ConsumerKey>>",
ConsumerSecret: "<<ConsumerSecret>>",
OAuthToken: "<<OAuthToken>>",
OAuthTokenSecret: "<<OAuthTokenSecret>>",
}
api := freshbooks.NewApi("<<AccountName>>", token)