Versions in this module Expand all Collapse all v1 v1.0.1 May 26, 2022 Changes in this version + const BaseURL + const Currency + const Custom + const Identifier + const None + const Percentage + func IsAuthError(err error) bool + func IsNotFoundError(err error) bool + func IsPayloadTooLarge(err error) bool + func IsRateLimited(err error) bool + func IsRecoverableError(err error) bool + func RetryAfter(err error) time.Duration + type AddCustomFieldSettingRequest struct + CustomField string + Important bool + InsertAfter string + InsertBefore string + type AddDependenciesRequest struct + Dependencies []string + type AddDependentsRequest struct + Dependents []string + type AddProjectRequest struct + InsertAfter string + InsertBefore string + Project string + Section string + type App struct + func NewApp(config *AppConfig) *App + func (a *App) AuthCodeURL(state string) string + func (a *App) Exchange(code string) (*oauth2.Token, error) + func (a *App) NewClient(token *oauth2.Token) *Client + type AppConfig struct + ClientID string + ClientSecret string + DisplayUI bool + RedirectURL string + type Attachment struct + CreatedAt *time.Time + DownloadURL string + Host string + ID string + Name string + Parent *Task + PermanentURL string + ViewURL string + type Client struct + BaseURL *url.URL + Debug bool + DefaultOptions Options + HTTPClient *http.Client + Verbose []bool + func NewClient(httpClient *http.Client) *Client + func NewClientWithAccessToken(accessToken string) *Client + func (c *Client) AllWorkspaces(options ...*Options) ([]*Workspace, error) + func (c *Client) CreateCustomField(request *CreateCustomFieldRequest) (*CustomField, error) + func (c *Client) CreateProject(project *CreateProjectRequest) (*Project, error) + func (c *Client) CreateTask(task *CreateTaskRequest) (*Task, error) + func (c *Client) CurrentUser() (*User, error) + func (c *Client) QueryTasks(query *TaskQuery, opts ...*Options) ([]*Task, *NextPage, error) + func (c *Client) Workspaces(options ...*Options) ([]*Workspace, *NextPage, error) + type CreateCustomFieldRequest struct + EnumOptions []*EnumValueBase + Workspace string + type CreateMembership struct + Project string + Section string + type CreateProjectRequest struct + CustomFields map[string]interface{} + Owner string + Team string + Workspace string + type CreateTaskRequest struct + Assignee string + CustomFields map[string]interface{} + Followers []string + Memberships []*CreateMembership + Parent string + Projects []string + Tags []string + Workspace string + func (t *CreateTaskRequest) Validate() error + type CustomField struct + EnumOptions []*EnumValue + ID string + func (f *CustomField) Fetch(client *Client, options ...*Options) error + type CustomFieldBase struct + CurrencyCode string + CustomLabel string + CustomLabelPosition LabelPosition + Description string + Enabled *bool + Format Format + HasNotificationsEnabled *bool + IsGlobalToWorkspace *bool + Name string + Precision *int + ResourceSubtype FieldType + type CustomFieldSetting struct + CustomField *CustomField + ID string + Important bool + Project *Project + type CustomFieldValue struct + EnumValue *EnumValue + NumberValue *float64 + TextValue *string + type Date time.Time + func (d *Date) MarshalJSON() ([]byte, error) + func (d *Date) UnmarshalJSON(value []byte) error + type Dates struct + DueAt *time.Time + DueOn *Date + StartOn *Date + type EnumValue struct + Enabled bool + ID string + type EnumValueBase struct + Color string + Name string + type Error struct + Help string + Message string + Phrase string + RequestID string + RetryAfter time.Duration + StatusCode int + Type string + func IsAsanaError(err error) (*Error, bool) + func (err Error) Error() string + type ExternalData struct + Data string + ID string + type Feature string + const NewSections + const NewTaskSubtypes + const StringIDs + func (f Feature) String() string + type FieldType string + const Enum + const Number + const Text + type Format string + type LabelPosition string + const Prefix + const Suffix + type Membership struct + Project *Project + Section *Section + type NewAttachment struct + ContentType string + FileName string + Reader io.ReadCloser + type NextPage struct + Offset string + Path string + URI string + type Options struct + Disable []Feature + Enable []Feature + Expand []string + FastAPI bool + Fields []string + JSONP string + Limit int + Method string + Offset string + Owner string + Pretty bool + Workspace string + func Fields(i interface{}) *Options + type Portfolio struct + ID string + type Project struct + CreatedAt *time.Time + CustomFieldSettings []*CustomFieldSetting + CustomFields []*CustomFieldValue + Followers []*User + ID string + Members []*User + ModifiedAt *time.Time + Owner *User + Team *Team + Workspace *Workspace + func (p *Project) AddCustomFieldSetting(client *Client, request *AddCustomFieldSettingRequest) (*CustomFieldSetting, error) + func (p *Project) CreateSection(client *Client, section *SectionBase) (*Section, error) + func (p *Project) Fetch(client *Client, opts ...*Options) error + func (p *Project) InsertSection(client *Client, request *SectionInsertRequest) error + func (p *Project) RemoveCustomFieldSetting(client *Client, customFieldID string) error + func (p *Project) Sections(client *Client, opts ...*Options) ([]*Section, *NextPage, error) + func (p *Project) Tasks(client *Client, opts ...*Options) ([]*Task, *NextPage, error) + func (p *Project) Update(client *Client, request *UpdateProjectRequest, opts ...*Options) error + type ProjectBase struct + Archived bool + Color string + CurrentStatus *ProjectStatus + DefaultView View + DueOn *Date + HTMLNotes string + Icon string + IsTemplate bool + Name string + Notes string + Public bool + StartOn *Date + type ProjectStatus struct + Author *User + Color string + Text string + type Response struct + Data json.RawMessage + Errors []*Error + NextPage *NextPage + func (r *Response) Error(resp *http.Response, requestID xid.ID) error + type Section struct + CreatedAt *time.Time + ID string + Project *Project + func (s *Section) Delete(client *Client) error + func (s *Section) Fetch(client *Client) error + func (s *Section) Tasks(client *Client, opts ...*Options) ([]*Task, *NextPage, error) + type SectionBase struct + Name string + type SectionInsertRequest struct + AfterSection string + BeforeSection string + Project string + Section string + type SectionMigrationStatus string + const Completed + const InProgress + const NotMigrated + type SetParentRequest struct + InsertAfter string + InsertBefore string + Parent string + type Story struct + CreatedAt *time.Time + CreatedBy *User + ID string + Liked bool + Likes []*User + NumLikes int32 + ResourceSubtype string + Source string + Target *Task + func (s *Story) Delete(client *Client) error + func (s *Story) UpdateStory(client *Client, story *StoryBase) (*Story, error) + type StoryBase struct + HTMLText string + IsPinned bool + Text string + type StorySubtypeFields struct + Assignee *User + Attachment *Attachment + Dependency *Task + Dependent *Task + DuplicateOf *Task + DuplicatedFrom *Task + Follower *User + IsEdited bool + NewDates *Dates + NewEnumValue *EnumValue + NewName string + NewNumberValue float64 + NewResourceSubtype string + NewSection *Section + NewTextValue string + OldDates *Dates + OldEnumValue *EnumValue + OldName string + OldNumberValue float64 + OldResourceSubtype string + OldSection *Section + OldTextValue string + Project *Project + Story *Story + Tag *Tag + Task *Task + type Tag struct + CreatedAt *time.Time + Followers []*User + ID string + Workspace *Workspace + func (t *Tag) Fetch(client *Client, options ...*Options) error + type TagBase struct + Color string + Name string + Notes string + type Task struct + Assignee *User + AssigneeStatus string + CompletedAt *time.Time + CreatedAt *time.Time + CustomFields []*CustomFieldValue + Dependencies []*Task + Dependents []*Task + Followers []*User + ID string + Liked bool + Likes []*User + Memberships []*Membership + ModifiedAt *time.Time + NumLikes int32 + NumSubtasks int32 + Parent *Task + Projects []*Project + Tags []*Tag + Workspace *Workspace + func (t *Task) AddDependencies(client *Client, request *AddDependenciesRequest) error + func (t *Task) AddDependents(client *Client, request *AddDependentsRequest) error + func (t *Task) AddProject(client *Client, request *AddProjectRequest) error + func (t *Task) Attachments(client *Client, opts ...*Options) ([]*Attachment, *NextPage, error) + func (t *Task) CreateAttachment(client *Client, request *NewAttachment) (*Attachment, error) + func (t *Task) CreateComment(client *Client, story *StoryBase) (*Story, error) + func (t *Task) CreateSubtask(client *Client, task *Task) (*Task, error) + func (t *Task) Delete(client *Client) error + func (t *Task) Fetch(client *Client) error + func (t *Task) RemoveProject(client *Client, projectID string) error + func (t *Task) SetParent(client *Client, request *SetParentRequest) error + func (t *Task) Stories(client *Client, opts ...*Options) ([]*Story, *NextPage, error) + func (t *Task) Subtasks(client *Client, opts ...*Options) ([]*Task, *NextPage, error) + func (t *Task) Update(client *Client, update *UpdateTaskRequest) error + type TaskBase struct + AssigneeStatus string + Completed *bool + DueAt *time.Time + DueOn *Date + External *ExternalData + HTMLNotes string + IsRenderedAsSeparator bool + Name string + Notes string + ResourceSubtype string + StartOn *Date + type TaskQuery struct + Assignee string + CompletedSince string + ModifiedSince string + Project string + Section string + Workspace string + type Team struct + Description string + HTMLDescription string + ID string + Name string + Organization *Workspace + func (t *Team) AllProjects(client *Client, options ...*Options) ([]*Project, error) + func (t *Team) CreateProject(c *Client, project *CreateProjectRequest) (*Project, error) + func (t *Team) Fetch(client *Client) error + func (t *Team) Projects(client *Client, options ...*Options) ([]*Project, *NextPage, error) + type UpdateProjectRequest struct + CustomFields map[string]interface{} + Owner string + type UpdateTaskRequest struct + Assignee string + Followers []string + type User struct + Email string + ID string + Name string + Photo map[string]string + Workspaces []*Workspace + func (u *User) Fetch(client *Client, options ...*Options) error + type Validator interface + Validate func() error + type View string + const Board + const Calendar + const List + const Timeline + type Workspace struct + EmailDomains []string + ID string + IsOrganization bool + Name string + func (w *Workspace) AllCustomFields(client *Client, options ...*Options) ([]*CustomField, error) + func (w *Workspace) AllFavoriteProjects(client *Client, options ...*Options) ([]*Project, error) + func (w *Workspace) AllProjects(client *Client, options ...*Options) ([]*Project, error) + func (w *Workspace) AllTags(client *Client, options ...*Options) ([]*Tag, error) + func (w *Workspace) AllTeams(client *Client, options ...*Options) ([]*Team, error) + func (w *Workspace) AllUsers(client *Client, options ...*Options) ([]*User, error) + func (w *Workspace) CreateTag(client *Client, tag *TagBase) (*Tag, error) + func (w *Workspace) CustomFields(client *Client, options ...*Options) ([]*CustomField, *NextPage, error) + func (w *Workspace) FavoriteProjects(client *Client, options ...*Options) ([]*Project, *NextPage, error) + func (w *Workspace) Fetch(client *Client) error + func (w *Workspace) Portfolios(client *Client, options ...*Options) ([]*Portfolio, *NextPage, error) + func (w *Workspace) Projects(client *Client, options ...*Options) ([]*Project, *NextPage, error) + func (w *Workspace) Tags(client *Client, options ...*Options) ([]*Tag, *NextPage, error) + func (w *Workspace) Teams(client *Client, options ...*Options) ([]*Team, *NextPage, error) + func (w *Workspace) Users(client *Client, options ...*Options) ([]*User, *NextPage, error)