我们正在更新 Data API,以便与 YouTube 统计 Shorts 短视频观看次数的方式保持一致。
了解详情
MembershipsLevels
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
注意:只有个人创作者才能使用此端点为自己启用了频道会员功能的 YouTube 频道发出请求。请与您的 Google 或 YouTube 代表联系,请求访问权限。
membershipsLevel
资源用于标识由授权 API 请求的创作者管理的定价级别。
方法
该 API 支持对 membershipsLevel
资源使用以下方法:
- list
- 列出授权请求的频道的会员级别。
属性
下表定义了此资源中显示的属性:
属性 |
kind |
string
用于标识 API 资源的类型。该值将为 youtube#membershipsLevel 。 |
etag |
etag
此资源的 ETag。 |
id |
string
由 YouTube 分配的 ID,用于唯一标识会员等级。即使等级的显示名称发生变化,此值也不会更改。 |
snippet |
object
snippet 对象包含有关会员等级的详细信息。 |
snippet.creatorChannelId |
string
拥有相应定价级别的创作者的 YouTube 频道 ID。 |
snippet.levelDetails |
object
此对象包含有关会员等级的数据。 |
snippet.levelDetails.displayName |
string
相应关卡的显示名称。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-21。"],[],["The `membershipsLevel` resource identifies pricing levels for a channel's memberships. Creators can use the `list` method to retrieve these levels via the API. Each level includes a unique `id`, `etag`, `kind`, and a `snippet` object. The `snippet` details the `creatorChannelId` and `levelDetails`. `levelDetails` contains the `displayName` for that specific membership level. The API access is restricted to individual creators of channel-membership enabled YouTube channels.\n"],null,["# MembershipsLevels\n\nNote: This endpoint can only be used by individual creators to make requests for their own, channel-memberships-enabled YouTube channel. Reach out to your Google or YouTube representative to request access.\n\nA **membershipsLevel** resource identifies a pricing level managed\nby the creator that authorized the API request.\n\nMethods\n-------\n\nThe API supports the following methods for `membershipsLevel` resources:\n\n[list](/youtube/v3/docs/membershipsLevels/list)\n: Lists membership levels for the channel that authorized the request.\n\nResource representation\n-----------------------\n\nThe following JSON structure shows the format of a `membershipsLevel` resource: \n\n```text\n{\n \"kind\": \"youtube#membershipsLevel\",\n \"etag\": etag,\n \"id\": string,\n \"snippet\": {\n \"creatorChannelId\": string,\n \"levelDetails\": {\n \"displayName\": string,\n }\n }\n}\n```\n\n### Properties\n\nThe following table defines the properties that appear in this resource:\n\n| Properties ||\n|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the API resource's type. The value will be `youtube#membershipsLevel`. |\n| `etag` | `etag` The Etag of this resource. |\n| `id` | `string` The ID that YouTube assigns to uniquely identify the membership level. This value will not change even if the level's display name changes. |\n| `snippet` | `object` The `snippet` object contains details about the membership level. |\n| snippet.`creatorChannelId` | `string` The YouTube channel ID of the creator that owns the pricing level. |\n| snippet.`levelDetails` | `object` This object contains data about the membership level. |\n| snippet.levelDetails.`displayName` | `string` The level's display name. |"]]