UserPhoto
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Rappresentazione JSON |
{
"id": string,
"primaryEmail": string,
"kind": string,
"etag": string,
"photoData": string,
"mimeType": string,
"width": integer,
"height": integer
} |
Campi |
id |
string
L'ID utilizzato dall'API per identificare in modo univoco l'utente.
|
primaryEmail |
string
L'indirizzo email principale dell'utente.
|
kind |
string
Il tipo di risorsa API. Per le risorse di Foto, è admin#directory#user#photo .
|
etag |
string
ETag della risorsa.
|
photoData |
string (bytes format)
I dati di caricamento della foto dell'utente in formato Base64 sicuro per il web in byte. Ciò significa che:
- Il carattere barra (/) viene sostituito dal carattere trattino basso (_).
- Il carattere del segno più (+) viene sostituito con il carattere del trattino (-).
- Il carattere del segno di uguale (=) viene sostituito dall'asterisco (*).
- Per il riempimento, viene utilizzato il carattere punto (.) anziché la definizione baseURL RFC-4648 che utilizza il segno di uguale (=) per il riempimento. Questo viene fatto per semplificare l'analisi dell'URL.
- Indipendentemente dalle dimensioni della foto caricata, l'API la ridimensiona a 96 x 96 pixel.
Una stringa con codifica Base64.
|
mimeType |
string
Il tipo MIME della foto. I valori consentiti sono JPEG , PNG , GIF , BMP , TIFF e la codifica base64 sicura per il web.
|
width |
integer
Larghezza della foto in pixel.
|
height |
integer
Altezza della foto in pixel.
|
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 2025-07-24 UTC.
[null,null,["Ultimo aggiornamento 2025-07-24 UTC."],[],[],null,["# UserPhoto\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"primaryEmail\": string, \"kind\": string, \"etag\": string, \"photoData\": string, \"mimeType\": string, \"width\": integer, \"height\": integer } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` The ID the API uses to uniquely identify the user. |\n| `primaryEmail` | `string` The user's primary email address. |\n| `kind` | `string` The type of the API resource. For Photo resources, this is `admin#directory#user#photo`. |\n| `etag` | `string` ETag of the resource. |\n| `photoData` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The user photo's upload data in [web-safe Base64](https://en.wikipedia.org/wiki/Base64#URL_applications) format in bytes. This means: - The slash (/) character is replaced with the underscore (_) character. - The plus sign (+) character is replaced with the hyphen (-) character. - The equals sign (=) character is replaced with the asterisk (\\*). - For padding, the period (.) character is used instead of the RFC-4648 baseURL definition which uses the equals sign (=) for padding. This is done to simplify URL-parsing. - Whatever the size of the photo being uploaded, the API downsizes it to 96x96 pixels. A base64-encoded string. |\n| `mimeType` | `string` The MIME type of the photo. Allowed values are `JPEG`, `PNG`, `GIF`, `BMP`, `TIFF`, and web-safe base64 encoding. |\n| `width` | `integer` Width of the photo in pixels. |\n| `height` | `integer` Height of the photo in pixels. |"]]