FanFundingEvents: list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
注意:这是关于弃用的公告。
粉丝资助功能已弃用,我们将于 2017 年 2 月 28 日停用 Fan Funding API。此弃用通知正好与 YouTube 新推出的
超级留言功能发布同时进行。
列出某个频道的粉丝资助活动。API 请求必须由频道所有者授权。
请求
HTTP 请求
GET https://www.googleapis.com/youtube/v3/fanFundingEvents
授权
此请求需要获得以下至少一个范围的授权(详细了解身份验证和授权)。
范围 |
https://www.googleapis.com/auth/youtube |
https://www.googleapis.com/auth/youtube.force-ssl |
https://www.googleapis.com/auth/youtube.readonly |
参数
下表列出了此查询支持的参数。列出的所有参数都是查询参数。
参数 |
必需参数 |
part |
string
part 参数用于指定 API 响应将包含的 fanFundingEvent 资源部分。支持的值为 id 和 snippet 。 |
可选参数 |
hl |
string
hl 参数会指示 API 检索 YouTube 网站支持的特定应用语言的本地化货币显示字符串。例如,英语中,货币会显示为 $1.50 ,但法语中则会显示为 1,50$ 。
参数值必须是 i18nLanguages.list 方法返回的列表中包含的语言代码。 |
maxResults |
unsigned integer
maxResults 参数用于指定结果集中应返回的最大项数。可接受的值包括0 到50 (含 0 和 5000)。默认值为 5 。 |
pageToken |
string
pageToken 参数用于标识结果集中请求 API 服务器返回的特定网页。在 API 响应中,nextPageToken 属性用于标识请求的下一页结果。 |
响应
如果成功,此方法将返回采用以下结构的响应正文:
{
"kind": "youtube#fanFundingEventListResponse",
"etag": etag,
"nextPageToken": string,
"pageInfo": {
"totalResults": integer,
"resultsPerPage": integer
},
"items": [
fanFundingEvent resource
]
}
属性
下表定义了此资源中显示的属性:
属性 |
kind |
string
标识 API 资源类型。值为 youtube#fanFundingEventListResponse 。 |
etag |
etag
此资源的 Etag。 |
nextPageToken |
string
可用作 pageToken 参数值以检索结果集中的下一页的令牌。 |
pageInfo |
object
pageInfo 对象用于封装结果集的分页信息。 |
pageInfo.totalResults |
integer
结果集中的结果总数。 |
pageInfo.resultsPerPage |
integer
API 响应中包含的结果数。 |
items[] |
list
符合请求条件的粉丝资助活动列表。 |
错误
下表列出了该 API 为响应对此方法的调用可能返回的错误消息。如需了解详情,请参阅错误消息文档。
错误类型 |
错误详情 |
说明 |
forbidden (403) |
insufficientPermissions |
您没有查看频道的粉丝资助活动所需的权限。 |
invalidValue (400) |
fanFundingNotEnabledForChannelId |
频道未启用粉丝资助功能。 |
试试看!
使用 API Explorer 针对实际数据调用此方法,并查看 API 请求和响应。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-02-22。
[[["易于理解","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):2023-02-22。"],[[["\u003cp\u003eThe Fan Funding feature has been deprecated and its API will be shut down on February 28, 2017, replaced by YouTube's new Super Chat feature.\u003c/p\u003e\n"],["\u003cp\u003eThis API lists fan funding events for a channel, and the request must be authorized by the channel owner using one of the specified scopes.\u003c/p\u003e\n"],["\u003cp\u003eThe API requires the \u003ccode\u003epart\u003c/code\u003e parameter to specify which \u003ccode\u003efanFundingEvent\u003c/code\u003e resource parts to include, and supports optional parameters like \u003ccode\u003ehl\u003c/code\u003e, \u003ccode\u003emaxResults\u003c/code\u003e, and \u003ccode\u003epageToken\u003c/code\u003e for customization.\u003c/p\u003e\n"],["\u003cp\u003eThe API does not require a request body, and the response structure includes properties like \u003ccode\u003ekind\u003c/code\u003e, \u003ccode\u003eetag\u003c/code\u003e, \u003ccode\u003enextPageToken\u003c/code\u003e, \u003ccode\u003epageInfo\u003c/code\u003e, and \u003ccode\u003eitems\u003c/code\u003e, providing information about the result set and fan funding events.\u003c/p\u003e\n"],["\u003cp\u003eThe API may return errors like \u003ccode\u003eforbidden (403)\u003c/code\u003e for insufficient permissions or \u003ccode\u003einvalidValue (400)\u003c/code\u003e if fan funding is not enabled for the channel.\u003c/p\u003e\n"]]],["The Fan Funding feature and its API are deprecated and will be shut down on February 28, 2017, replaced by Super Chat. The API, accessible via a `GET` request, requires channel owner authorization and lists fan funding events. Key parameters include `part` (required), `hl`, `maxResults`, and `pageToken` (optional). The response includes details like kind, etag, and a list of fan funding events, while error handling is available.\n"],null,[]]