asana

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package asana is a plugin for bawt that interacts with Asana

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(key, workspace string) *Client

func (*Client) GetTagsOnTask

func (asana *Client) GetTagsOnTask(tagID int64) ([]Tag, error)

func (*Client) GetTaskByID

func (asana *Client) GetTaskByID(taskID int64) (*Task, error)

func (*Client) GetTaskStories

func (asana *Client) GetTaskStories(taskID int64) ([]Story, error)

func (*Client) GetTasksByAssignee

func (asana *Client) GetTasksByAssignee(user User) ([]Task, error)

func (*Client) GetTasksByTag

func (asana *Client) GetTasksByTag(tagID string) ([]Task, error)

func (*Client) GetUser

func (asana *Client) GetUser(userID int64) (*User, error)

func (*Client) GetUsers

func (asana *Client) GetUsers() ([]User, error)

func (*Client) Request

func (asana *Client) Request(method string, uri string, strbody string) ([]byte, error)

func (*Client) SetWorkspace

func (asana *Client) SetWorkspace(workspace string)

func (*Client) UpdateTask

func (asana *Client) UpdateTask(updateStr string, task Task) (*Task, error)

type Photo

type Photo struct {
	Image21  string `json:"image_21x21"`
	Image27  string `json:"image_27x27"`
	Image36  string `json:"image_36x36"`
	Image60  string `json:"image_60x60"`
	Image128 string `json:"image_128x128"`
}

type Project

type Project struct {
	ID   int64
	Name string
}

type Story

type Story struct {
	ID        int64
	Text      string
	Type      string
	CreatedBy User   `json:"created_by"`
	CreatedAt string `json:"created_at"`
}

type Tag

type Tag struct {
	ID   int64
	Name string
}

func (*Tag) StringID

func (t *Tag) StringID() string

type Task

type Task struct {
	ID        int64
	Name      string
	Assignee  User
	Completed bool
	Followers []User
	Notes     string
	Projects  []Project
	Hearted   bool
	Hearts    []User
	NumHearts int `json:"num_hearts"`
	Tags      []Tag
	Workspace Workspace
}

type User

type User struct {
	ID         int64
	Name       string
	Email      string
	Photo      *Photo
	Workspaces []Workspace
}

type Workspace

type Workspace struct {
	ID   int64
	Name string
}

Jump to

Keyboard shortcuts

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