FanFundingEvents: list
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
توجه: این یک اعلامیه منسوخ شدن است.
ویژگی Fan Funding منسوخ شده است و Fan Funding API در 28 فوریه 2017 خاموش خواهد شد. این اعلامیه لغو همزمان با انتشار ویژگی جدید
Super Chat 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 بخشهای منبع 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 Explorer برای فراخوانی این روش در داده های زنده و مشاهده درخواست و پاسخ API استفاده کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2023-02-22 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 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,["# 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."]]