go-asana

module
v0.0.0-...-6c0cb70 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2016 License: MIT

README

go-asana

Build Status GoDoc Coverage Status

Go library for accessing the Asana API.

Note: go-asana is currently in development, so its API may have slightly breaking changes if we find better ways of doing things.

Usage
import "github.com/tambet/go-asana/asana"

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

client := asana.NewClient(nil)
workspaces, err := client.ListWorkspaces()
Authentication

The go-asana 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 := asana.NewClient(t.Client())

// List all projects for the authenticated user
projects, err := client.ListProjects(opt)

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

Directories

Path Synopsis
Package asana is a client for Asana API.
Package asana is a client for Asana API.

Jump to

Keyboard shortcuts

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