Settings: list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回经过身份验证的用户的所有用户设置。立即试用。
请求
HTTP 请求
GET https://www.googleapis.com/calendar/v3/users/me/settings
参数
参数名称 |
值 |
说明 |
可选的查询参数 |
maxResults |
integer |
一个结果页面中返回的条目数上限。默认值为 100 个条目。每页数据大小不得超过 250 个条目。可选。
|
pageToken |
string |
用于指定要返回的结果页面的令牌。可选。
|
syncToken |
string |
从上一个列表请求的最后一页结果中返回的 nextSyncToken 字段中获取的令牌。这会使此列表请求的结果仅包含自那时起发生更改的条目。 如果 syncToken 过期,服务器将返回 410 GONE 响应代码,客户端应清除其存储空间,并在不使用任何 syncToken 的情况下执行完整同步。 详细了解增量同步。 可选。默认是返回所有条目。
|
授权
此请求需要获得以下至少一个范围的授权:
范围 |
https://www.googleapis.com/auth/calendar.readonly |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.settings.readonly |
如需了解详情,请参阅身份验证和授权页面。
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回采用以下结构的响应正文:
{
"kind": "calendar#settings",
"etag": etag,
"nextPageToken": string,
"nextSyncToken": string,
"items": [
settings Resource
]
}
属性名称 |
值 |
说明 |
备注 |
kind |
string |
集合类型(“calendar#settings ”)。 |
|
etag |
etag |
合集的 ETag。 |
|
items[] |
list |
用户设置列表。 |
|
nextPageToken |
string |
用于访问此结果的下一页的令牌。如果没有更多结果,则省略此字段,在这种情况下,系统会提供 nextSyncToken 。 |
|
nextSyncToken |
string |
在稍后的时间点用于仅检索自此结果返回后发生更改的条目。如果有更多结果,则省略此属性,并提供 nextPageToken 。 |
|
试试看!
使用下面的 API Explorer 对实际数据调用此方法,然后查看响应。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Settings: list\n\n| **Note:** Requires [authorization](#auth).\n\nReturns all user settings for the authenticated user.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/calendar/v3/users/me/settings\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Optional query parameters** |||\n| `maxResults` | `integer` | Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. |\n| `pageToken` | `string` | Token specifying which result page to return. Optional. |\n| `syncToken` | `string` | Token obtained from the `nextSyncToken` field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If the `syncToken` expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any `syncToken`. [Learn more](/workspace/calendar/api/guides/sync) about incremental synchronization. Optional. The default is to return all entries. |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|--------------------------------------------------------------|\n| `https://www.googleapis.com/auth/calendar.readonly` |\n| `https://www.googleapis.com/auth/calendar` |\n| `https://www.googleapis.com/auth/calendar.settings.readonly` |\n\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```objective-c\n{\n \"kind\": \"calendar#settings\",\n \"etag\": etag,\n \"nextPageToken\": string,\n \"nextSyncToken\": string,\n \"items\": [\n settings Resource\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|-----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | Type of the collection (\"`calendar#settings`\"). | |\n| `etag` | `etag` | Etag of the collection. | |\n| `items[]` | `list` | List of user settings. | |\n| `nextPageToken` | `string` | Token used to access the next page of this result. Omitted if no further results are available, in which case `nextSyncToken` is provided. | |\n| `nextSyncToken` | `string` | Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case `nextPageToken` is provided. | |\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]