Skip to content

tambet/go-teamweek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-teamweek

Go library for accessing the Teamweek API

Build Status Coverage Status

Usage

import "github.com/tambet/go-teamweek/teamweek"

Create a new Teamweek client instance, then use provided methods on the client to access the API. For example, to list all accounts:

client := teamweek.NewClient(nil)
accounts, err := client.ListAccounts()

Authentication

The go-teamweek library does not directly handle authentication. Instead, when creating a new client, pass an http.Client that can handle authentication for you. The easiest way to do this is using the goauth2 library, but you can always use any other library that provides an http.Client. If you have an OAuth2 access token, you can use it with the goauth2 using:

t := &oauth.Transport{
  Token: &oauth.Token{AccessToken: "... your access token ..."},
}

client := teamweek.NewClient(t.Client())

// Get authenticated user's profile information
profile, err := client.Profile()

See the goauth2 docs for complete instructions on using that library.

About

Go library for accessing the Teamweek API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages