Documentation ¶
Overview ¶
Package tasks provides access to the Google Tasks API.
For product documentation, see: https://developers.google.com/tasks/
Library status ¶
These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.
Creating a client ¶
Usage example:
import "google.golang.org/api/tasks/v1" ... ctx := context.Background() tasksService, err := tasks.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use google.golang.org/api/option.WithScopes:
tasksService, err := tasks.NewService(ctx, option.WithScopes(tasks.TasksReadonlyScope))
To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:
tasksService, err := tasks.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) tasksService, err := tasks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See google.golang.org/api/option.ClientOption for details on options.
Index ¶
- Constants
- type AssignmentInfo
- type DriveResourceInfo
- type Service
- type SpaceInfo
- type Task
- type TaskLinks
- type TaskList
- type TaskLists
- type TasklistsDeleteCall
- type TasklistsGetCall
- func (c *TasklistsGetCall) Context(ctx context.Context) *TasklistsGetCall
- func (c *TasklistsGetCall) Do(opts ...googleapi.CallOption) (*TaskList, error)
- func (c *TasklistsGetCall) Fields(s ...googleapi.Field) *TasklistsGetCall
- func (c *TasklistsGetCall) Header() http.Header
- func (c *TasklistsGetCall) IfNoneMatch(entityTag string) *TasklistsGetCall
- type TasklistsInsertCall
- type TasklistsListCall
- func (c *TasklistsListCall) Context(ctx context.Context) *TasklistsListCall
- func (c *TasklistsListCall) Do(opts ...googleapi.CallOption) (*TaskLists, error)
- func (c *TasklistsListCall) Fields(s ...googleapi.Field) *TasklistsListCall
- func (c *TasklistsListCall) Header() http.Header
- func (c *TasklistsListCall) IfNoneMatch(entityTag string) *TasklistsListCall
- func (c *TasklistsListCall) MaxResults(maxResults int64) *TasklistsListCall
- func (c *TasklistsListCall) PageToken(pageToken string) *TasklistsListCall
- func (c *TasklistsListCall) Pages(ctx context.Context, f func(*TaskLists) error) error
- type TasklistsPatchCall
- type TasklistsService
- func (r *TasklistsService) Delete(tasklistid string) *TasklistsDeleteCall
- func (r *TasklistsService) Get(tasklistid string) *TasklistsGetCall
- func (r *TasklistsService) Insert(tasklist *TaskList) *TasklistsInsertCall
- func (r *TasklistsService) List() *TasklistsListCall
- func (r *TasklistsService) Patch(tasklistid string, tasklist *TaskList) *TasklistsPatchCall
- func (r *TasklistsService) Update(tasklistid string, tasklist *TaskList) *TasklistsUpdateCall
- type TasklistsUpdateCall
- type Tasks
- type TasksClearCall
- type TasksDeleteCall
- type TasksGetCall
- func (c *TasksGetCall) Context(ctx context.Context) *TasksGetCall
- func (c *TasksGetCall) Do(opts ...googleapi.CallOption) (*Task, error)
- func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall
- func (c *TasksGetCall) Header() http.Header
- func (c *TasksGetCall) IfNoneMatch(entityTag string) *TasksGetCall
- type TasksInsertCall
- func (c *TasksInsertCall) Context(ctx context.Context) *TasksInsertCall
- func (c *TasksInsertCall) Do(opts ...googleapi.CallOption) (*Task, error)
- func (c *TasksInsertCall) Fields(s ...googleapi.Field) *TasksInsertCall
- func (c *TasksInsertCall) Header() http.Header
- func (c *TasksInsertCall) Parent(parent string) *TasksInsertCall
- func (c *TasksInsertCall) Previous(previous string) *TasksInsertCall
- type TasksListCall
- func (c *TasksListCall) CompletedMax(completedMax string) *TasksListCall
- func (c *TasksListCall) CompletedMin(completedMin string) *TasksListCall
- func (c *TasksListCall) Context(ctx context.Context) *TasksListCall
- func (c *TasksListCall) Do(opts ...googleapi.CallOption) (*Tasks, error)
- func (c *TasksListCall) DueMax(dueMax string) *TasksListCall
- func (c *TasksListCall) DueMin(dueMin string) *TasksListCall
- func (c *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall
- func (c *TasksListCall) Header() http.Header
- func (c *TasksListCall) IfNoneMatch(entityTag string) *TasksListCall
- func (c *TasksListCall) MaxResults(maxResults int64) *TasksListCall
- func (c *TasksListCall) PageToken(pageToken string) *TasksListCall
- func (c *TasksListCall) Pages(ctx context.Context, f func(*Tasks) error) error
- func (c *TasksListCall) ShowAssigned(showAssigned bool) *TasksListCall
- func (c *TasksListCall) ShowCompleted(showCompleted bool) *TasksListCall
- func (c *TasksListCall) ShowDeleted(showDeleted bool) *TasksListCall
- func (c *TasksListCall) ShowHidden(showHidden bool) *TasksListCall
- func (c *TasksListCall) UpdatedMin(updatedMin string) *TasksListCall
- type TasksMoveCall
- func (c *TasksMoveCall) Context(ctx context.Context) *TasksMoveCall
- func (c *TasksMoveCall) DestinationTasklist(destinationTasklist string) *TasksMoveCall
- func (c *TasksMoveCall) Do(opts ...googleapi.CallOption) (*Task, error)
- func (c *TasksMoveCall) Fields(s ...googleapi.Field) *TasksMoveCall
- func (c *TasksMoveCall) Header() http.Header
- func (c *TasksMoveCall) Parent(parent string) *TasksMoveCall
- func (c *TasksMoveCall) Previous(previous string) *TasksMoveCall
- type TasksPatchCall
- type TasksService
- func (r *TasksService) Clear(tasklistid string) *TasksClearCall
- func (r *TasksService) Delete(tasklistid string, taskid string) *TasksDeleteCall
- func (r *TasksService) Get(tasklistid string, taskid string) *TasksGetCall
- func (r *TasksService) Insert(tasklistid string, task *Task) *TasksInsertCall
- func (r *TasksService) List(tasklistid string) *TasksListCall
- func (r *TasksService) Move(tasklistid string, taskid string) *TasksMoveCall
- func (r *TasksService) Patch(tasklistid string, taskid string, task *Task) *TasksPatchCall
- func (r *TasksService) Update(tasklistid string, taskid string, task *Task) *TasksUpdateCall
- type TasksUpdateCall
Constants ¶
const ( // Create, edit, organize, and delete all your tasks TasksScope = "https://www.googleapis.com/auth/tasks" // View your tasks TasksReadonlyScope = "https://www.googleapis.com/auth/tasks.readonly" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentInfo ¶ added in v0.188.0
type AssignmentInfo struct { // DriveResourceInfo: Output only. Information about the Drive file where this // task originates from. Currently, the Drive file can only be a document. This // field is read-only. DriveResourceInfo *DriveResourceInfo `json:"driveResourceInfo,omitempty"` // LinkToTask: Output only. An absolute link to the original task in the // surface of assignment (Docs, Chat spaces, etc.). LinkToTask string `json:"linkToTask,omitempty"` // SpaceInfo: Output only. Information about the Chat Space where this task // originates from. This field is read-only. SpaceInfo *SpaceInfo `json:"spaceInfo,omitempty"` // SurfaceType: Output only. The type of surface this assigned task originates // from. Currently limited to DOCUMENT or SPACE. // // Possible values: // "CONTEXT_TYPE_UNSPECIFIED" - Unknown value for this task's context. // "GMAIL" - The task is created from Gmail. // "DOCUMENT" - The task is assigned from a document. // "SPACE" - The task is assigned from a Chat Space. SurfaceType string `json:"surfaceType,omitempty"` // ForceSendFields is a list of field names (e.g. "DriveResourceInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DriveResourceInfo") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
AssignmentInfo: Information about the source of the task assignment (Document, Chat Space).
func (AssignmentInfo) MarshalJSON ¶ added in v0.188.0
func (s AssignmentInfo) MarshalJSON() ([]byte, error)
type DriveResourceInfo ¶ added in v0.188.0
type DriveResourceInfo struct { // DriveFileId: Output only. Identifier of the file in the Drive API. DriveFileId string `json:"driveFileId,omitempty"` // ResourceKey: Output only. Resource key required to access files shared via a // shared link. Not required for all files. See also // developers.google.com/drive/api/guides/resource-keys. ResourceKey string `json:"resourceKey,omitempty"` // ForceSendFields is a list of field names (e.g. "DriveFileId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DriveFileId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
DriveResourceInfo: Information about the Drive resource where a task was assigned from (the document, sheet, etc.).
func (DriveResourceInfo) MarshalJSON ¶ added in v0.188.0
func (s DriveResourceInfo) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Tasklists *TasklistsService Tasks *TasksService // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶ added in v0.3.0
NewService creates a new Service.
type SpaceInfo ¶ added in v0.188.0
type SpaceInfo struct { // Space: Output only. The Chat space where this task originates from. The // format is "spaces/{space}". Space string `json:"space,omitempty"` // ForceSendFields is a list of field names (e.g. "Space") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Space") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
SpaceInfo: Information about the Chat Space where a task was assigned from.
func (SpaceInfo) MarshalJSON ¶ added in v0.188.0
type Task ¶
type Task struct { // AssignmentInfo: Output only. Context information for assigned tasks. A task // can be assigned to a user, currently possible from surfaces like Docs and // Chat Spaces. This field is populated for tasks assigned to the current user // and identifies where the task was assigned from. This field is read-only. AssignmentInfo *AssignmentInfo `json:"assignmentInfo,omitempty"` // Completed: Completion date of the task (as a RFC 3339 timestamp). This field // is omitted if the task has not been completed. Completed *string `json:"completed,omitempty"` // Deleted: Flag indicating whether the task has been deleted. For assigned // tasks this field is read-only. They can only be deleted by calling // tasks.delete, in which case both the assigned task and the original task (in // Docs or Chat Spaces) are deleted. To delete the assigned task only, navigate // to the assignment surface and unassign the task from there. The default is // False. Deleted bool `json:"deleted,omitempty"` // Due: Due date of the task (as a RFC 3339 timestamp). Optional. The due date // only records date information; the time portion of the timestamp is // discarded when setting the due date. It isn't possible to read or write the // time that a task is due via the API. Due string `json:"due,omitempty"` // Etag: ETag of the resource. Etag string `json:"etag,omitempty"` // Hidden: Flag indicating whether the task is hidden. This is the case if the // task had been marked completed when the task list was last cleared. The // default is False. This field is read-only. Hidden bool `json:"hidden,omitempty"` // Id: Task identifier. Id string `json:"id,omitempty"` // Kind: Output only. Type of the resource. This is always "tasks#task". Kind string `json:"kind,omitempty"` // Links: Output only. Collection of links. This collection is read-only. Links []*TaskLinks `json:"links,omitempty"` // Notes: Notes describing the task. Tasks assigned from Google Docs cannot // have notes. Optional. Maximum length allowed: 8192 characters. Notes string `json:"notes,omitempty"` // Parent: Output only. Parent task identifier. This field is omitted if it is // a top-level task. Use the "move" method to move the task under a different // parent or to the top level. A parent task can never be an assigned task // (from Chat Spaces, Docs). This field is read-only. Parent string `json:"parent,omitempty"` // Position: Output only. String indicating the position of the task among its // sibling tasks under the same parent task or at the top level. If this string // is greater than another task's corresponding position string according to // lexicographical ordering, the task is positioned after the other task under // the same parent task (or at the top level). Use the "move" method to move // the task to another position. Position string `json:"position,omitempty"` // SelfLink: Output only. URL pointing to this task. Used to retrieve, update, // or delete this task. SelfLink string `json:"selfLink,omitempty"` // Status: Status of the task. This is either "needsAction" or "completed". Status string `json:"status,omitempty"` // Title: Title of the task. Maximum length allowed: 1024 characters. Title string `json:"title,omitempty"` // Updated: Output only. Last modification time of the task (as a RFC 3339 // timestamp). Updated string `json:"updated,omitempty"` // WebViewLink: Output only. An absolute link to the task in the Google Tasks // Web UI. WebViewLink string `json:"webViewLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "AssignmentInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AssignmentInfo") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
func (Task) MarshalJSON ¶
type TaskLinks ¶
type TaskLinks struct { // Description: The description. In HTML speak: Everything between <a> and // </a>. Description string `json:"description,omitempty"` // Link: The URL. Link string `json:"link,omitempty"` // Type: Type of the link, e.g. "email". Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Description") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
func (TaskLinks) MarshalJSON ¶
type TaskList ¶
type TaskList struct { // Etag: ETag of the resource. Etag string `json:"etag,omitempty"` // Id: Task list identifier. Id string `json:"id,omitempty"` // Kind: Output only. Type of the resource. This is always "tasks#taskList". Kind string `json:"kind,omitempty"` // SelfLink: Output only. URL pointing to this task list. Used to retrieve, // update, or delete this task list. SelfLink string `json:"selfLink,omitempty"` // Title: Title of the task list. Maximum length allowed: 1024 characters. Title string `json:"title,omitempty"` // Updated: Output only. Last modification time of the task list (as a RFC 3339 // timestamp). Updated string `json:"updated,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Etag") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
func (TaskList) MarshalJSON ¶
type TaskLists ¶
type TaskLists struct { // Etag: ETag of the resource. Etag string `json:"etag,omitempty"` // Items: Collection of task lists. Items []*TaskList `json:"items,omitempty"` // Kind: Type of the resource. This is always "tasks#taskLists". Kind string `json:"kind,omitempty"` // NextPageToken: Token that can be used to request the next page of this // result. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Etag") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
func (TaskLists) MarshalJSON ¶
type TasklistsDeleteCall ¶
type TasklistsDeleteCall struct {
// contains filtered or unexported fields
}
func (*TasklistsDeleteCall) Context ¶
func (c *TasklistsDeleteCall) Context(ctx context.Context) *TasklistsDeleteCall
Context sets the context to be used in this call's Do method.
func (*TasklistsDeleteCall) Do ¶
func (c *TasklistsDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "tasks.tasklists.delete" call.
func (*TasklistsDeleteCall) Fields ¶
func (c *TasklistsDeleteCall) Fields(s ...googleapi.Field) *TasklistsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasklistsDeleteCall) Header ¶
func (c *TasklistsDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type TasklistsGetCall ¶
type TasklistsGetCall struct {
// contains filtered or unexported fields
}
func (*TasklistsGetCall) Context ¶
func (c *TasklistsGetCall) Context(ctx context.Context) *TasklistsGetCall
Context sets the context to be used in this call's Do method.
func (*TasklistsGetCall) Do ¶
func (c *TasklistsGetCall) Do(opts ...googleapi.CallOption) (*TaskList, error)
Do executes the "tasks.tasklists.get" call. Any non-2xx status code is an error. Response headers are in either *TaskList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasklistsGetCall) Fields ¶
func (c *TasklistsGetCall) Fields(s ...googleapi.Field) *TasklistsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasklistsGetCall) Header ¶
func (c *TasklistsGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*TasklistsGetCall) IfNoneMatch ¶
func (c *TasklistsGetCall) IfNoneMatch(entityTag string) *TasklistsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type TasklistsInsertCall ¶
type TasklistsInsertCall struct {
// contains filtered or unexported fields
}
func (*TasklistsInsertCall) Context ¶
func (c *TasklistsInsertCall) Context(ctx context.Context) *TasklistsInsertCall
Context sets the context to be used in this call's Do method.
func (*TasklistsInsertCall) Do ¶
func (c *TasklistsInsertCall) Do(opts ...googleapi.CallOption) (*TaskList, error)
Do executes the "tasks.tasklists.insert" call. Any non-2xx status code is an error. Response headers are in either *TaskList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasklistsInsertCall) Fields ¶
func (c *TasklistsInsertCall) Fields(s ...googleapi.Field) *TasklistsInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasklistsInsertCall) Header ¶
func (c *TasklistsInsertCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type TasklistsListCall ¶
type TasklistsListCall struct {
// contains filtered or unexported fields
}
func (*TasklistsListCall) Context ¶
func (c *TasklistsListCall) Context(ctx context.Context) *TasklistsListCall
Context sets the context to be used in this call's Do method.
func (*TasklistsListCall) Do ¶
func (c *TasklistsListCall) Do(opts ...googleapi.CallOption) (*TaskLists, error)
Do executes the "tasks.tasklists.list" call. Any non-2xx status code is an error. Response headers are in either *TaskLists.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasklistsListCall) Fields ¶
func (c *TasklistsListCall) Fields(s ...googleapi.Field) *TasklistsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasklistsListCall) Header ¶
func (c *TasklistsListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*TasklistsListCall) IfNoneMatch ¶
func (c *TasklistsListCall) IfNoneMatch(entityTag string) *TasklistsListCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*TasklistsListCall) MaxResults ¶
func (c *TasklistsListCall) MaxResults(maxResults int64) *TasklistsListCall
MaxResults sets the optional parameter "maxResults": Maximum number of task lists returned on one page. The default is 20 (max allowed: 100).
func (*TasklistsListCall) PageToken ¶
func (c *TasklistsListCall) PageToken(pageToken string) *TasklistsListCall
PageToken sets the optional parameter "pageToken": Token specifying the result page to return.
type TasklistsPatchCall ¶
type TasklistsPatchCall struct {
// contains filtered or unexported fields
}
func (*TasklistsPatchCall) Context ¶
func (c *TasklistsPatchCall) Context(ctx context.Context) *TasklistsPatchCall
Context sets the context to be used in this call's Do method.
func (*TasklistsPatchCall) Do ¶
func (c *TasklistsPatchCall) Do(opts ...googleapi.CallOption) (*TaskList, error)
Do executes the "tasks.tasklists.patch" call. Any non-2xx status code is an error. Response headers are in either *TaskList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasklistsPatchCall) Fields ¶
func (c *TasklistsPatchCall) Fields(s ...googleapi.Field) *TasklistsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasklistsPatchCall) Header ¶
func (c *TasklistsPatchCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type TasklistsService ¶
type TasklistsService struct {
// contains filtered or unexported fields
}
func NewTasklistsService ¶
func NewTasklistsService(s *Service) *TasklistsService
func (*TasklistsService) Delete ¶
func (r *TasklistsService) Delete(tasklistid string) *TasklistsDeleteCall
Delete: Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the assigned tasks and the original tasks in the assignment surface (Docs, Chat Spaces) are deleted.
- tasklist: Task list identifier.
func (*TasklistsService) Get ¶
func (r *TasklistsService) Get(tasklistid string) *TasklistsGetCall
Get: Returns the authenticated user's specified task list.
- tasklist: Task list identifier.
func (*TasklistsService) Insert ¶
func (r *TasklistsService) Insert(tasklist *TaskList) *TasklistsInsertCall
Insert: Creates a new task list and adds it to the authenticated user's task lists. A user can have up to 2000 lists at a time.
func (*TasklistsService) List ¶
func (r *TasklistsService) List() *TasklistsListCall
List: Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.
func (*TasklistsService) Patch ¶
func (r *TasklistsService) Patch(tasklistid string, tasklist *TaskList) *TasklistsPatchCall
Patch: Updates the authenticated user's specified task list. This method supports patch semantics.
- tasklist: Task list identifier.
func (*TasklistsService) Update ¶
func (r *TasklistsService) Update(tasklistid string, tasklist *TaskList) *TasklistsUpdateCall
Update: Updates the authenticated user's specified task list.
- tasklist: Task list identifier.
type TasklistsUpdateCall ¶
type TasklistsUpdateCall struct {
// contains filtered or unexported fields
}
func (*TasklistsUpdateCall) Context ¶
func (c *TasklistsUpdateCall) Context(ctx context.Context) *TasklistsUpdateCall
Context sets the context to be used in this call's Do method.
func (*TasklistsUpdateCall) Do ¶
func (c *TasklistsUpdateCall) Do(opts ...googleapi.CallOption) (*TaskList, error)
Do executes the "tasks.tasklists.update" call. Any non-2xx status code is an error. Response headers are in either *TaskList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasklistsUpdateCall) Fields ¶
func (c *TasklistsUpdateCall) Fields(s ...googleapi.Field) *TasklistsUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasklistsUpdateCall) Header ¶
func (c *TasklistsUpdateCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type Tasks ¶
type Tasks struct { // Etag: ETag of the resource. Etag string `json:"etag,omitempty"` // Items: Collection of tasks. Items []*Task `json:"items,omitempty"` // Kind: Type of the resource. This is always "tasks#tasks". Kind string `json:"kind,omitempty"` // NextPageToken: Token used to access the next page of this result. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Etag") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
func (Tasks) MarshalJSON ¶
type TasksClearCall ¶
type TasksClearCall struct {
// contains filtered or unexported fields
}
func (*TasksClearCall) Context ¶
func (c *TasksClearCall) Context(ctx context.Context) *TasksClearCall
Context sets the context to be used in this call's Do method.
func (*TasksClearCall) Do ¶
func (c *TasksClearCall) Do(opts ...googleapi.CallOption) error
Do executes the "tasks.tasks.clear" call.
func (*TasksClearCall) Fields ¶
func (c *TasksClearCall) Fields(s ...googleapi.Field) *TasksClearCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksClearCall) Header ¶
func (c *TasksClearCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type TasksDeleteCall ¶
type TasksDeleteCall struct {
// contains filtered or unexported fields
}
func (*TasksDeleteCall) Context ¶
func (c *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall
Context sets the context to be used in this call's Do method.
func (*TasksDeleteCall) Do ¶
func (c *TasksDeleteCall) Do(opts ...googleapi.CallOption) error
Do executes the "tasks.tasks.delete" call.
func (*TasksDeleteCall) Fields ¶
func (c *TasksDeleteCall) Fields(s ...googleapi.Field) *TasksDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksDeleteCall) Header ¶
func (c *TasksDeleteCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type TasksGetCall ¶
type TasksGetCall struct {
// contains filtered or unexported fields
}
func (*TasksGetCall) Context ¶
func (c *TasksGetCall) Context(ctx context.Context) *TasksGetCall
Context sets the context to be used in this call's Do method.
func (*TasksGetCall) Do ¶
func (c *TasksGetCall) Do(opts ...googleapi.CallOption) (*Task, error)
Do executes the "tasks.tasks.get" call. Any non-2xx status code is an error. Response headers are in either *Task.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasksGetCall) Fields ¶
func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksGetCall) Header ¶
func (c *TasksGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*TasksGetCall) IfNoneMatch ¶
func (c *TasksGetCall) IfNoneMatch(entityTag string) *TasksGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
type TasksInsertCall ¶
type TasksInsertCall struct {
// contains filtered or unexported fields
}
func (*TasksInsertCall) Context ¶
func (c *TasksInsertCall) Context(ctx context.Context) *TasksInsertCall
Context sets the context to be used in this call's Do method.
func (*TasksInsertCall) Do ¶
func (c *TasksInsertCall) Do(opts ...googleapi.CallOption) (*Task, error)
Do executes the "tasks.tasks.insert" call. Any non-2xx status code is an error. Response headers are in either *Task.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasksInsertCall) Fields ¶
func (c *TasksInsertCall) Fields(s ...googleapi.Field) *TasksInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksInsertCall) Header ¶
func (c *TasksInsertCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*TasksInsertCall) Parent ¶
func (c *TasksInsertCall) Parent(parent string) *TasksInsertCall
Parent sets the optional parameter "parent": Parent task identifier. If the task is created at the top level, this parameter is omitted. An assigned task cannot be a parent task, nor can it have a parent. Setting the parent to an assigned task results in failure of the request.
func (*TasksInsertCall) Previous ¶
func (c *TasksInsertCall) Previous(previous string) *TasksInsertCall
Previous sets the optional parameter "previous": Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted.
type TasksListCall ¶
type TasksListCall struct {
// contains filtered or unexported fields
}
func (*TasksListCall) CompletedMax ¶
func (c *TasksListCall) CompletedMax(completedMax string) *TasksListCall
CompletedMax sets the optional parameter "completedMax": Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. The default is not to filter by completion date.
func (*TasksListCall) CompletedMin ¶
func (c *TasksListCall) CompletedMin(completedMin string) *TasksListCall
CompletedMin sets the optional parameter "completedMin": Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. The default is not to filter by completion date.
func (*TasksListCall) Context ¶
func (c *TasksListCall) Context(ctx context.Context) *TasksListCall
Context sets the context to be used in this call's Do method.
func (*TasksListCall) Do ¶
func (c *TasksListCall) Do(opts ...googleapi.CallOption) (*Tasks, error)
Do executes the "tasks.tasks.list" call. Any non-2xx status code is an error. Response headers are in either *Tasks.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasksListCall) DueMax ¶
func (c *TasksListCall) DueMax(dueMax string) *TasksListCall
DueMax sets the optional parameter "dueMax": Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. The default is not to filter by due date.
func (*TasksListCall) DueMin ¶
func (c *TasksListCall) DueMin(dueMin string) *TasksListCall
DueMin sets the optional parameter "dueMin": Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. The default is not to filter by due date.
func (*TasksListCall) Fields ¶
func (c *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksListCall) Header ¶
func (c *TasksListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*TasksListCall) IfNoneMatch ¶
func (c *TasksListCall) IfNoneMatch(entityTag string) *TasksListCall
IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.
func (*TasksListCall) MaxResults ¶
func (c *TasksListCall) MaxResults(maxResults int64) *TasksListCall
MaxResults sets the optional parameter "maxResults": Maximum number of tasks returned on one page. The default is 20 (max allowed: 100).
func (*TasksListCall) PageToken ¶
func (c *TasksListCall) PageToken(pageToken string) *TasksListCall
PageToken sets the optional parameter "pageToken": Token specifying the result page to return.
func (*TasksListCall) Pages ¶
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*TasksListCall) ShowAssigned ¶ added in v0.188.0
func (c *TasksListCall) ShowAssigned(showAssigned bool) *TasksListCall
ShowAssigned sets the optional parameter "showAssigned": Flag indicating whether tasks assigned to the current user are returned in the result. Optional. The default is False.
func (*TasksListCall) ShowCompleted ¶
func (c *TasksListCall) ShowCompleted(showCompleted bool) *TasksListCall
ShowCompleted sets the optional parameter "showCompleted": Flag indicating whether completed tasks are returned in the result. Note that showHidden must also be True to show tasks completed in first party clients, such as the web UI and Google's mobile apps. The default is True.
func (*TasksListCall) ShowDeleted ¶
func (c *TasksListCall) ShowDeleted(showDeleted bool) *TasksListCall
ShowDeleted sets the optional parameter "showDeleted": Flag indicating whether deleted tasks are returned in the result. The default is False.
func (*TasksListCall) ShowHidden ¶
func (c *TasksListCall) ShowHidden(showHidden bool) *TasksListCall
ShowHidden sets the optional parameter "showHidden": Flag indicating whether hidden tasks are returned in the result. The default is False.
func (*TasksListCall) UpdatedMin ¶
func (c *TasksListCall) UpdatedMin(updatedMin string) *TasksListCall
UpdatedMin sets the optional parameter "updatedMin": Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. The default is not to filter by last modification time.
type TasksMoveCall ¶
type TasksMoveCall struct {
// contains filtered or unexported fields
}
func (*TasksMoveCall) Context ¶
func (c *TasksMoveCall) Context(ctx context.Context) *TasksMoveCall
Context sets the context to be used in this call's Do method.
func (*TasksMoveCall) DestinationTasklist ¶ added in v0.188.0
func (c *TasksMoveCall) DestinationTasklist(destinationTasklist string) *TasksMoveCall
DestinationTasklist sets the optional parameter "destinationTasklist": Destination task list identifier. If set, the task is moved from tasklist to the destinationTasklist list. Otherwise the task is moved within its current list. Recurrent tasks cannot currently be moved between lists. Optional.
func (*TasksMoveCall) Do ¶
func (c *TasksMoveCall) Do(opts ...googleapi.CallOption) (*Task, error)
Do executes the "tasks.tasks.move" call. Any non-2xx status code is an error. Response headers are in either *Task.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasksMoveCall) Fields ¶
func (c *TasksMoveCall) Fields(s ...googleapi.Field) *TasksMoveCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksMoveCall) Header ¶
func (c *TasksMoveCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (*TasksMoveCall) Parent ¶
func (c *TasksMoveCall) Parent(parent string) *TasksMoveCall
Parent sets the optional parameter "parent": New parent task identifier. If the task is moved to the top level, this parameter is omitted. Assigned tasks can not be set as parent task (have subtasks) or be moved under a parent task (become subtasks).
func (*TasksMoveCall) Previous ¶
func (c *TasksMoveCall) Previous(previous string) *TasksMoveCall
Previous sets the optional parameter "previous": New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted.
type TasksPatchCall ¶
type TasksPatchCall struct {
// contains filtered or unexported fields
}
func (*TasksPatchCall) Context ¶
func (c *TasksPatchCall) Context(ctx context.Context) *TasksPatchCall
Context sets the context to be used in this call's Do method.
func (*TasksPatchCall) Do ¶
func (c *TasksPatchCall) Do(opts ...googleapi.CallOption) (*Task, error)
Do executes the "tasks.tasks.patch" call. Any non-2xx status code is an error. Response headers are in either *Task.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasksPatchCall) Fields ¶
func (c *TasksPatchCall) Fields(s ...googleapi.Field) *TasksPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksPatchCall) Header ¶
func (c *TasksPatchCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type TasksService ¶
type TasksService struct {
// contains filtered or unexported fields
}
func NewTasksService ¶
func NewTasksService(s *Service) *TasksService
func (*TasksService) Clear ¶
func (r *TasksService) Clear(tasklistid string) *TasksClearCall
Clear: Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list.
- tasklist: Task list identifier.
func (*TasksService) Delete ¶
func (r *TasksService) Delete(tasklistid string, taskid string) *TasksDeleteCall
Delete: Deletes the specified task from the task list. If the task is assigned, both the assigned task and the original task (in Docs, Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there.
- task: Task identifier. - tasklist: Task list identifier.
func (*TasksService) Get ¶
func (r *TasksService) Get(tasklistid string, taskid string) *TasksGetCall
Get: Returns the specified task.
- task: Task identifier. - tasklist: Task list identifier.
func (*TasksService) Insert ¶
func (r *TasksService) Insert(tasklistid string, task *Task) *TasksInsertCall
Insert: Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be inserted from Tasks Public API; they can only be created by assigning them from Docs or Chat Spaces. A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
- tasklist: Task list identifier.
func (*TasksService) List ¶
func (r *TasksService) List(tasklistid string) *TasksListCall
List: Returns all tasks in the specified task list. Does not return assigned tasks be default (from Docs, Chat Spaces). A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
- tasklist: Task list identifier.
func (*TasksService) Move ¶
func (r *TasksService) Move(tasklistid string, taskid string) *TasksMoveCall
Move: Moves the specified task to another position in the destination task list. If the destination list is not specified, the task is moved within its current list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. A user can have up to 2,000 subtasks per task.
- task: Task identifier. - tasklist: Task list identifier.
func (*TasksService) Patch ¶
func (r *TasksService) Patch(tasklistid string, taskid string, task *Task) *TasksPatchCall
Patch: Updates the specified task. This method supports patch semantics.
- task: Task identifier. - tasklist: Task list identifier.
func (*TasksService) Update ¶
func (r *TasksService) Update(tasklistid string, taskid string, task *Task) *TasksUpdateCall
Update: Updates the specified task.
- task: Task identifier. - tasklist: Task list identifier.
type TasksUpdateCall ¶
type TasksUpdateCall struct {
// contains filtered or unexported fields
}
func (*TasksUpdateCall) Context ¶
func (c *TasksUpdateCall) Context(ctx context.Context) *TasksUpdateCall
Context sets the context to be used in this call's Do method.
func (*TasksUpdateCall) Do ¶
func (c *TasksUpdateCall) Do(opts ...googleapi.CallOption) (*Task, error)
Do executes the "tasks.tasks.update" call. Any non-2xx status code is an error. Response headers are in either *Task.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*TasksUpdateCall) Fields ¶
func (c *TasksUpdateCall) Fields(s ...googleapi.Field) *TasksUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*TasksUpdateCall) Header ¶
func (c *TasksUpdateCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.