FanFundingEvents: list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
注意:這是淘汰公告內容。
粉絲贊助功能已淘汰,2017 年 2 月 28 日 Fan Fund 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 (含首尾)。預設值為 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 |
頻道未啟用粉絲贊助功能。 |
試試看!
使用 APIs Explorer 針對即時資料呼叫這個方法,並查看 API 要求和回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間: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"]],["上次更新時間: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,[]]