使用任务参数
除了可与大多数 Google API 一起使用的标准查询参数外,还有一组 Tasks 参数。
下表总结了仅适用于 Google Tasks API 中的请求参数。所有参数值都需要经过网址编码。
参数 |
含义 |
备注 |
适用性 |
completedMax |
任务完成日期的上限(采用 RFC 3339 时间戳形式),以进行过滤。 |
- 默认:
completedMax=2031-01-01
- 使用 RFC 3339 时间戳格式。例如:
2010-08-09T10:57:00.000-08:00 。
|
|
completedMin |
任务完成日期的下限(以 RFC 3339 时间戳形式过滤)。 |
- 默认:
completedMin=1970-01-01
- 使用 RFC 3339 时间戳格式。例如:
2010-08-09T10:57:00.000-08:00 。
|
|
dueMax |
任务截止日期(以 RFC 3339 时间戳形式)进行过滤的上限。 |
- 默认:
dueMax=2031-01-01
- 使用 RFC 3339 时间戳格式。例如:
2010-08-09T10:57:00.000-08:00 。
|
|
dueMin |
任务的截止日期(以 RFC 3339 时间戳为准),以进行过滤。 |
- 默认:
dueMin=1970-01-01
- 使用 RFC 3339 时间戳格式。例如:
2010-08-09T10:57:00.000-08:00 。
|
|
maxResults |
随该请求返回的元素数上限。 |
- 默认:
maxResults=20
- 允许的最大值:
maxResults=100.
|
|
pageToken |
用于指定要返回的结果页面的令牌。 |
|
|
parent |
指定任务的父任务 ID。 |
|
|
previous |
指定任务的上一个任务 ID。 |
|
|
showCompleted |
指定是否显示已完成的任务。 |
|
|
showDeleted |
指定是否显示已删除的任务。 |
|
|
showHidden |
指定是否显示隐藏的任务。 |
|
|
updatedMin |
任务上次修改时间的下限(以 RFC 3339 时间戳为准)。 |
- 使用 RFC 3339 时间戳格式。例如:
2010-08-09T10:57:00.000-08:00Z 。
- 默认为不按上次修改时间进行过滤。
|
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-03。
[null,null,["最后更新时间 (UTC):2024-09-03。"],[[["In addition to standard query parameters, the Google Tasks API utilizes specific parameters for refined task management."],["These parameters control filtering by due dates, completion dates, modification times, and the visibility of completed, deleted, or hidden tasks."],["Developers can use these parameters to retrieve specific sets of tasks based on various criteria, such as completion status and due dates, using RFC 3339 timestamps for filtering."],["Parameters like `maxResults` and `pageToken` allow for pagination and control over the number of tasks returned in a response."],["The `parent` and `previous` parameters enable developers to manage task hierarchy and ordering within task lists."]]],["The Google Tasks API uses specific parameters for operations, all of which require URL encoding. These parameters filter tasks by `completedMin/Max`, `dueMin/Max`, and `updatedMin` date ranges using RFC 3339 timestamps. `maxResults` limits the number of returned items, and `pageToken` specifies the result page. `parent` and `previous` parameters determine task order, while `showCompleted`, `showDeleted`, and `showHidden` control the visibility of tasks. These parameters apply to retrieving tasks and task lists, creating, and ordering tasks.\n"]]