asana

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("asana: unauthorized")

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(token, domain, cachePath string, logger *zap.Logger) (*Client, error)

func (*Client) Me

func (c *Client) Me(ctx context.Context) (*User, error)

func (*Client) ProjectList

func (c *Client) ProjectList(ctx context.Context, opts ProjectListOpts) (*Projects, error)

func (*Client) Request

func (c *Client) Request(ctx context.Context, opts ReqOpts, ret interface{}) error

func (*Client) TeamList added in v1.4.0

func (c *Client) TeamList(ctx context.Context, opts TeamListOpts) (*Teams, error)

func (*Client) WorkspaceList added in v1.2.0

func (c *Client) WorkspaceList(ctx context.Context) (*Workspaces, error)

type Project

type Project struct {
	GID          string `json:"gid,omitempty"`
	Name         string `json:"name,omitempty"`
	ResourceType string `json:"resource_type,omitempty"`
}

type ProjectListOpts

type ProjectListOpts struct {
	Workspace string `url:"workspace,omitempty"`
	Team      string `url:"team,omitempty"`
	Archived  bool   `url:"archived,omitempty"`
}

type Projects

type Projects []Project

type ReqOpts

type ReqOpts struct {
	Method string
	Path   string
	Data   interface{}
	Form   url.Values
	Opts   interface{}
}

type Team added in v1.4.0

type Team struct {
	GID             string    `json:"gid,omitempty"`
	Name            string    `json:"name,omitempty"`
	ResourceType    string    `json:"resource_type,omitempty"`
	Description     string    `json:"description,omitempty"`
	HTMLDescription string    `json:"html_description,omitempty"`
	Workspace       Workspace `json:"organization,omitempty"`
	PermalinkURL    string    `json:"permalink_url,omitempty"`
	Visibility      string    `json:"visibility,omitempty"`
}

type TeamListOpts added in v1.4.0

type TeamListOpts struct {
	Workspace    string `url:"workspace,omitempty"`
	User         string `url:"user,omitempty"`
	Organization string `url:"organization,omitempty"`
	OptFields    string `url:"opt_fields,omitempty"`
}

type Teams added in v1.4.0

type Teams []Team

type User

type User struct {
	GID   string `json:"gid,omitempty"`
	Email string `json:"email,omitempty"`
	Name  string `json:"name,omitempty"`
	Photo struct {
		Image2121   string `json:"image_21x21,omitempty"`
		Image2727   string `json:"image_27x27,omitempty"`
		Image3636   string `json:"image_36x36,omitempty"`
		Image6060   string `json:"image_60x60,omitempty"`
		Image128128 string `json:"image_128x128,omitempty"`
	} `json:"photo,omitempty"`
	ResourceType string      `json:"resource_type,omitempty"`
	Workspaces   []Workspace `json:"workspaces,omitempty"`
}

type Workspace

type Workspace struct {
	GID          string `json:"gid,omitempty"`
	Name         string `json:"name,omitempty"`
	ResourceType string `json:"resource_type,omitempty"`
}

type Workspaces added in v1.2.0

type Workspaces []Workspace

Jump to

Keyboard shortcuts

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