Documentation ¶
Overview ¶
Package tasks provides access to the Tasks API.
See https://developers.google.com/google-apps/tasks/firstapp
Usage example:
import "google.golang.org/api/tasks/v1" ... tasksService, err := tasks.New(oauthHttpClient)
Index ¶
- Constants
- type Service
- type Task
- type TaskLinks
- type TaskList
- type TaskLists
- type TasklistsDeleteCall
- type TasklistsGetCall
- type TasklistsInsertCall
- type TasklistsListCall
- 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
- type TasksInsertCall
- type TasksListCall
- func (c *TasksListCall) CompletedMax(completedMax string) *TasksListCall
- func (c *TasksListCall) CompletedMin(completedMin string) *TasksListCall
- func (c *TasksListCall) Do() (*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) MaxResults(maxResults int64) *TasksListCall
- func (c *TasksListCall) PageToken(pageToken string) *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
- 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 ( // Manage 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 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 }
type Task ¶
type Task struct { // 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. The // default if False. Deleted bool `json:"deleted,omitempty"` // Due: Due date of the task (as a RFC 3339 timestamp). Optional. 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: Type of the resource. This is always "tasks#task". Kind string `json:"kind,omitempty"` // Links: Collection of links. This collection is read-only. Links []*TaskLinks `json:"links,omitempty"` // Notes: Notes describing the task. Optional. Notes string `json:"notes,omitempty"` // Parent: Parent task identifier. This field is omitted if it is a // top-level task. This field is read-only. Use the "move" method to // move the task under a different parent or to the top level. Parent string `json:"parent,omitempty"` // Position: 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). This // field is read-only. Use the "move" method to move the task to another // position. Position string `json:"position,omitempty"` // SelfLink: 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. Title string `json:"title,omitempty"` // Updated: Last modification time of the task (as a RFC 3339 // timestamp). Updated string `json:"updated,omitempty"` }
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: Type of the resource. This is always "tasks#taskList". Kind string `json:"kind,omitempty"` // SelfLink: 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. Title string `json:"title,omitempty"` // Updated: Last modification time of the task list (as a RFC 3339 // timestamp). Updated string `json:"updated,omitempty"` }
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"` }
type TasklistsDeleteCall ¶
type TasklistsDeleteCall struct {
// contains filtered or unexported fields
}
func (*TasklistsDeleteCall) Do ¶
func (c *TasklistsDeleteCall) Do() error
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 information.
type TasklistsGetCall ¶
type TasklistsGetCall struct {
// contains filtered or unexported fields
}
func (*TasklistsGetCall) Do ¶
func (c *TasklistsGetCall) Do() (*TaskList, error)
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 information.
type TasklistsInsertCall ¶
type TasklistsInsertCall struct {
// contains filtered or unexported fields
}
func (*TasklistsInsertCall) Do ¶
func (c *TasklistsInsertCall) Do() (*TaskList, error)
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 information.
type TasklistsListCall ¶
type TasklistsListCall struct {
// contains filtered or unexported fields
}
func (*TasklistsListCall) Do ¶
func (c *TasklistsListCall) Do() (*TaskLists, error)
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 information.
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 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) Do ¶
func (c *TasklistsPatchCall) Do() (*TaskList, error)
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 information.
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.
func (*TasklistsService) Get ¶
func (r *TasklistsService) Get(tasklistid string) *TasklistsGetCall
Get: Returns the authenticated user's specified task list.
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.
func (*TasklistsService) List ¶
func (r *TasklistsService) List() *TasklistsListCall
List: Returns all the authenticated user's task lists.
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.
func (*TasklistsService) Update ¶
func (r *TasklistsService) Update(tasklistid string, tasklist *TaskList) *TasklistsUpdateCall
Update: Updates the authenticated user's specified task list.
type TasklistsUpdateCall ¶
type TasklistsUpdateCall struct {
// contains filtered or unexported fields
}
func (*TasklistsUpdateCall) Do ¶
func (c *TasklistsUpdateCall) Do() (*TaskList, error)
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 information.
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"` }
type TasksClearCall ¶
type TasksClearCall struct {
// contains filtered or unexported fields
}
func (*TasksClearCall) Do ¶
func (c *TasksClearCall) Do() error
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 information.
type TasksDeleteCall ¶
type TasksDeleteCall struct {
// contains filtered or unexported fields
}
func (*TasksDeleteCall) Do ¶
func (c *TasksDeleteCall) Do() error
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 information.
type TasksGetCall ¶
type TasksGetCall struct {
// contains filtered or unexported fields
}
func (*TasksGetCall) Do ¶
func (c *TasksGetCall) Do() (*Task, error)
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 information.
type TasksInsertCall ¶
type TasksInsertCall struct {
// contains filtered or unexported fields
}
func (*TasksInsertCall) Do ¶
func (c *TasksInsertCall) Do() (*Task, error)
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 information.
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.
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) Do ¶
func (c *TasksListCall) Do() (*Tasks, error)
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 information.
func (*TasksListCall) MaxResults ¶
func (c *TasksListCall) MaxResults(maxResults int64) *TasksListCall
MaxResults sets the optional parameter "maxResults": Maximum number of task lists returned on one page. The default is 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) ShowCompleted ¶
func (c *TasksListCall) ShowCompleted(showCompleted bool) *TasksListCall
ShowCompleted sets the optional parameter "showCompleted": Flag indicating whether completed tasks are returned in the result. 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) Do ¶
func (c *TasksMoveCall) Do() (*Task, error)
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 information.
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.
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) Do ¶
func (c *TasksPatchCall) Do() (*Task, error)
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 information.
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.
func (*TasksService) Delete ¶
func (r *TasksService) Delete(tasklistid string, taskid string) *TasksDeleteCall
Delete: Deletes the specified task from the task list.
func (*TasksService) Get ¶
func (r *TasksService) Get(tasklistid string, taskid string) *TasksGetCall
Get: Returns the specified task.
func (*TasksService) Insert ¶
func (r *TasksService) Insert(tasklistid string, task *Task) *TasksInsertCall
Insert: Creates a new task on the specified task list.
func (*TasksService) List ¶
func (r *TasksService) List(tasklistid string) *TasksListCall
List: Returns all tasks in the specified task list.
func (*TasksService) Move ¶
func (r *TasksService) Move(tasklistid string, taskid string) *TasksMoveCall
Move: Moves the specified task to another position in the task 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.
func (*TasksService) Patch ¶
func (r *TasksService) Patch(tasklistid string, taskid string, task *Task) *TasksPatchCall
Patch: Updates the specified task. This method supports patch semantics.
func (*TasksService) Update ¶
func (r *TasksService) Update(tasklistid string, taskid string, task *Task) *TasksUpdateCall
Update: Updates the specified task.
type TasksUpdateCall ¶
type TasksUpdateCall struct {
// contains filtered or unexported fields
}
func (*TasksUpdateCall) Do ¶
func (c *TasksUpdateCall) Do() (*Task, error)
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 information.