UserPhoto
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zapis JSON |
{
"id": string,
"primaryEmail": string,
"kind": string,
"etag": string,
"photoData": string,
"mimeType": string,
"width": integer,
"height": integer
} |
Pola |
id |
string
Identyfikator używany przez interfejs API do jednoznacznej identyfikacji użytkownika.
|
primaryEmail |
string
Podstawowy adres e-mail użytkownika.
|
kind |
string
Typ zasobu interfejsu API. W przypadku zasobów Zdjęć Google jest to admin#directory#user#photo .
|
etag |
string
ETag zasobu.
|
photoData |
string (bytes format)
dane przesłane w ramach usługi przesyłania zdjęć użytkownika w formacie Base64 z bezpiecznym kodowaniem na potrzeby internetu w bajtach. Oznacza to, że:
- Znak ukośnik (/) jest zastępowany znakiem podkreślenia (_).
- Znak plusa (+) jest zastępowany znakiem łącznika (-).
- Znak równości (=) jest zastępowany gwiazdką (*).
- Do wypełnienia używana jest kropka (.), a nie definicja baseURL z normy RFC-4648, która używa znaku równości (=) do wypełnienia. Ma to na celu uproszczenie analizowania adresów URL.
- Niezależnie od rozmiaru przesyłanego zdjęcia, interfejs API zmniejsza je do 96 x 96 pikseli.
Ciąg znaków zakodowany w formacie Base64.
|
mimeType |
string
Typ MIME zdjęcia. Dozwolone wartości to JPEG , PNG , GIF , BMP , TIFF i kodowanie base64 bezpieczne dla sieci.
|
width |
integer
Szerokość zdjęcia w pikselach.
|
height |
integer
Wysokość zdjęcia w pikselach.
|
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-24 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]