FanFundingEvents: list
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Nota: questo è un annuncio di ritiro.
La funzionalità Finanziamenti dei fan è stata ritirata e l'API Finanziamenti dei fan verrà disattivata il 28 febbraio 2017. Questo annuncio verrà ritirato con il lancio della nuova funzionalità
Superchat di YouTube.
Elenca gli eventi relativi ai finanziamenti dei fan per un canale. La richiesta API deve essere autorizzata dal proprietario del canale.
Risorse richieste:
Richiesta HTTP
GET https://www.googleapis.com/youtube/v3/fanFundingEvents
Autorizzazione
Questa richiesta richiede l'autorizzazione con almeno uno dei seguenti ambiti (scopri di più su autenticazione e autorizzazione).
Ambito |
https://www.googleapis.com/auth/youtube |
https://www.googleapis.com/auth/youtube.force-ssl |
https://www.googleapis.com/auth/youtube.readonly |
Parametri
Nella tabella seguente sono elencati i parametri supportati dalla query. Tutti i parametri elencati sono parametri di ricerca.
Parametri |
Parametri obbligatori |
part |
string
Il parametro part specifica le parti della risorsa fanFundingEvent che verranno incluse nella risposta dell'API. I valori supportati sono id e snippet . |
Parametri facoltativi |
hl |
string
Il parametro hl indica all'API di recuperare una stringa di visualizzazione della valuta localizzata per una specifica lingua dell'applicazione supportata dal sito web di YouTube. Ad esempio, in inglese la valuta viene mostrata come $1.50 , mentre in francese viene indicata come 1,50$ .
Il valore del parametro deve essere un codice lingua incluso nell'elenco restituito dal metodo i18nLanguages.list . |
maxResults |
unsigned integer
Il parametro maxResults specifica il numero massimo di elementi che devono essere restituiti nel set di risultati. I valori accettabili sono compresi tra 0 e 50 compresi. Il valore predefinito è 5 . |
pageToken |
string
Il parametro pageToken identifica la pagina specifica nel set di risultati che il server API deve restituire. In una risposta API, la proprietà nextPageToken identifica la pagina successiva dei risultati della richiesta. |
Corpo della richiesta
Non fornire un corpo della richiesta quando chiami questo metodo.
Risposta
In caso di esito positivo, questo metodo restituisce un corpo di risposta con la seguente struttura:
{
"kind": "youtube#fanFundingEventListResponse",
"etag": etag,
"nextPageToken": string,
"pageInfo": {
"totalResults": integer,
"resultsPerPage": integer
},
"items": [
fanFundingEvent resource
]
}
Proprietà
La tabella seguente definisce le proprietà che vengono visualizzate in questa risorsa:
Proprietà |
kind |
string
Identifica il tipo di risorsa API. Il valore sarà youtube#fanFundingEventListResponse . |
etag |
etag
L'Etag di questa risorsa. |
nextPageToken |
string
Il token che può essere utilizzato come valore del parametro pageToken per recuperare la pagina successiva nel set di risultati. |
pageInfo |
object
L'oggetto pageInfo incapsula le informazioni sul paging per il set di risultati. |
pageInfo.totalResults |
integer
Il numero totale di risultati nel set di risultati. |
pageInfo.resultsPerPage |
integer
Il numero di risultati inclusi nella risposta dell'API. |
items[] |
list
Un elenco di eventi relativi ai finanziamenti dei fan che corrispondono ai criteri della richiesta. |
Errori
La tabella seguente identifica i messaggi di errore che l'API potrebbe restituire in risposta a una chiamata a questo metodo. Per maggiori dettagli, consulta la documentazione sui messaggi di errore.
Tipo di errore |
Dettagli errore |
Descrizione |
forbidden (403) |
insufficientPermissions |
Non disponi delle autorizzazioni necessarie per visualizzare gli eventi di Finanziamenti dei fan del canale. |
invalidValue (400) |
fanFundingNotEnabledForChannelId |
Il canale non ha attivato i finanziamenti dei fan. |
Prova.
Utilizza Explorer API per richiamare questo metodo sui dati in tempo reale e visualizzare la richiesta e la risposta dell'API.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2023-02-22 UTC.
[null,null,["Ultimo aggiornamento 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."]]