task

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URICreateTask   = "/api/1.0/tasks"
	URIUpdateTask   = "/api/1.0/tasks/%s"
	ResourceSubtype = "default_task"
)
View Source
const (
	AddFollowersURI = "/api/1.0/tasks/%s/addFollowers"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Request Request `json:"data"`
}

type Follower

type Follower struct {
	Followers []string `json:"followers,omitempty"`
}

func (Follower) Add

func (f Follower) Add(token, taskID string) error

type FollowersRequest

type FollowersRequest struct {
	Data Follower `json:"data"`
}

type Request

type Request struct {
	ResourceSubtype string `json:"resource_subtype,omitempty"`
	Assignee        string `json:"assignee,omitempty"`
	Name            string `json:"name,omitempty"`
	Completed       bool   `json:"completed"`
	DueOn           string `json:"due_on,omitempty"`
	Liked           bool   `json:"linked,omitempty"`
	// Notes refer to the content of each Ticket
	Notes        string            `json:"notes,omitempty"`
	HtmlNotes    string            `json:"html_notes,omitempty"`
	StartOn      string            `json:"start_on,omitempty"`
	CustomFields map[string]string `json:"custom_fields,omitempty"`
	Projects     []string          `json:"projects,omitempty"`
	Workspace    string            `json:"workspace,omitempty"`

	TicketID   string `json:"-"`
	TicketType string `json:"-"`
	// contains filtered or unexported fields
}

func (Request) Create

func (r Request) Create() (resp *Response, err error)

func (*Request) GetPAToken

func (r *Request) GetPAToken() string

func (*Request) SetPAToken

func (r *Request) SetPAToken(token string)

func (Request) Update

func (r Request) Update(taskID string) error

type Response

type Response struct {
	ID             string `json:"gid"`
	Name           string `json:"name"`
	ResourceType   string `json:"resource_type"`
	AssigneeStatus string `json:"assignee_status"`
}

Jump to

Keyboard shortcuts

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