FanFundingEvents: list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หมายเหตุ: นี่คือประกาศการเลิกใช้งาน
เราจะเลิกใช้งานฟีเจอร์การให้เงินสนับสนุนของแฟนๆ และ API ของการให้เงินสนับสนุนของแฟนๆ จะปิดลงในวันที่ 28 กุมภาพันธ์ 2017 ประกาศเกี่ยวกับการเลิกใช้งานนี้สอดคล้องกับการเปิดตัวฟีเจอร์
Super Chat ใหม่ของ YouTube
แสดงรายการกิจกรรมการให้เงินสนับสนุนของแฟนๆ สําหรับช่อง เจ้าของช่องต้องเป็นผู้อนุญาตคําขอ API
ส่งคำขอ
คำขอ HTTP
GET https://www.googleapis.com/youtube/v3/fanFundingEvents
การให้สิทธิ์
คําขอนี้ต้องมีการให้สิทธิ์กับขอบเขตต่อไปนี้อย่างน้อย 1 ขอบเขต (อ่านเพิ่มเติมเกี่ยวกับการตรวจสอบสิทธิ์และการให้สิทธิ์)
ขอบเขต |
https://www.googleapis.com/auth/youtube |
https://www.googleapis.com/auth/youtube.force-ssl |
https://www.googleapis.com/auth/youtube.readonly |
พารามิเตอร์
ตารางต่อไปนี้จะแสดงพารามิเตอร์ที่คําค้นหานี้รองรับ พารามิเตอร์ทั้งหมดที่แสดงคือพารามิเตอร์การค้นหา
พารามิเตอร์ |
พารามิเตอร์ที่จําเป็น |
part |
string
พารามิเตอร์ part ระบุส่วนทรัพยากร fanFundingEvent ที่การตอบสนองของ API จะรวมอยู่ด้วย ค่าที่รองรับคือ 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 |
ช่องนี้ไม่ได้เปิดใช้การให้เงินสนับสนุนของแฟนๆ |
ลองใช้เลย
ใช้เครื่องมือสํารวจ API เพื่อใช้วิธีนี้ในข้อมูลสด รวมถึงดูคําขอและการตอบกลับ API
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-02-22 UTC
[null,null,["อัปเดตล่าสุด 2023-02-22 UTC"],[[["\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,["# FanFundingEvents: list\n\n**Note:** This is a deprecation announcement. \n\nThe Fan Funding feature has been deprecated, and the Fan Funding API will be turned off on February 28, 2017. This deprecation announcement coincides with the release of YouTube's new [Super Chat](https://youtube.googleblog.com/2017/01/can-we-chat-hello-super-chat.html) feature.\nLists fan funding events for a channel. The API request must be authorized by the channel owner.\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/youtube/v3/fanFundingEvents\n```\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/youtube/v3/live/authentication)).\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/youtube` |\n| `https://www.googleapis.com/auth/youtube.force-ssl` |\n| `https://www.googleapis.com/auth/youtube.readonly` |\n\n### Parameters\n\nThe following table lists the parameters that this query supports. All of the parameters listed are query parameters.\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| **Required parameters** |||\n| `part` | `string` The **part** parameter specifies the `fanFundingEvent` resource parts that the API response will include. Supported values are `id` and `snippet`. |\n| **Optional parameters** |||\n| `hl` | `string` The **hl** parameter instructs the API to retrieve a localized currency display string for a specific [application language that the YouTube website supports](/youtube/v3/docs/i18nLanguages). For example, in English, currency would be displayed as `$1.50`, but in French, it would be displayed as `1,50$`. The parameter value must be a language code included in the list returned by the [i18nLanguages.list](/youtube/v3/docs/i18nLanguages/list) method. |\n| `maxResults` | `unsigned integer` The **maxResults** parameter specifies the maximum number of items that should be returned in the result set. Acceptable values are `0` to `50`, inclusive. The default value is `5`. |\n| `pageToken` | `string` The **pageToken** parameter identifies the specific page in the result set that the API server is being asked to return. In an API response, the `nextPageToken` property identifies the next page of results for the request. |\n\n### Request body\n\nDo not provide a request body when calling 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\": \"youtube#fanFundingEventListResponse\",\n \"etag\": etag,\n \"nextPageToken\": string,\n \"pageInfo\": {\n \"totalResults\": integer,\n \"resultsPerPage\": integer\n },\n \"items\": [\n fanFundingEvent resource\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#fanFundingEventListResponse`. |\n| `etag` | `etag` The Etag of this resource. |\n| `nextPageToken` | `string` The token that can be used as the value of the `pageToken` parameter to retrieve the next page in the result set. |\n| `pageInfo` | `object` The `pageInfo` object encapsulates paging information for the result set. |\n| pageInfo.`totalResults` | `integer` The total number of results in the result set. |\n| pageInfo.`resultsPerPage` | `integer` The number of results included in the API response. |\n| `items[]` | `list` A list of fan funding events that match the request criteria. |\n\nErrors\n------\n\nThe following table identifies error messages that the API could return in response to a call to this method. Please see the [error message](/youtube/v3/live/docs/errors) documentation for more detail.\n\n| Error type | Error detail | Description |\n|----------------------|------------------------------------|-------------------------------------------------------------------------------------|\n| `forbidden (403)` | `insufficientPermissions` | You do not have the necessary permissions to view the channel's Fan Funding events. |\n| `invalidValue (400)` | `fanFundingNotEnabledForChannelId` | The channel does not have Fan Funding enabled. |\n\nTry it!\n-------\n\nUse the API Explorer to call this method on live data and see the API request and response."]]