UserPhoto
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การแสดง JSON |
{
"id": string,
"primaryEmail": string,
"kind": string,
"etag": string,
"photoData": string,
"mimeType": string,
"width": integer,
"height": integer
} |
ช่อง |
id |
string
รหัสที่ API ใช้เพื่อระบุตัวตนผู้ใช้โดยไม่ซ้ำกัน
|
primaryEmail |
string
อีเมลหลักของผู้ใช้
|
kind |
string
ประเภทของทรัพยากร API สำหรับทรัพยากรรูปภาพ จะเป็น admin#directory#user#photo
|
etag |
string
ETag ของทรัพยากร
|
photoData |
string (bytes format)
ข้อมูลการอัปโหลดรูปภาพของผู้ใช้ในรูปแบบ Base64 ซึ่งใช้กับเว็บได้เป็นไบต์ ซึ่งหมายความว่า
- ระบบจะแทนที่อักขระเครื่องหมายทับ (/) ด้วยอักขระขีดล่าง (_)
- นำอักขระขีดกลางสั้น (-) ไปแทนที่อักขระเครื่องหมายบวก (+)
- อักขระเครื่องหมายเท่ากับ (=) จะถูกแทนที่ด้วยเครื่องหมายดอกจัน (*)
- สำหรับส่วนต่อท้าย ระบบจะใช้อักขระจุด (.) แทนคําจํากัดความ baseURL ของ RFC-4648 ซึ่งใช้เครื่องหมายเท่ากับ (=) สําหรับส่วนต่อท้าย ซึ่งทําเพื่อให้การแยกวิเคราะห์ URL ง่ายขึ้น
- API จะลดขนาดรูปภาพให้เหลือ 96x96 พิกเซลไม่ว่าจะมีขนาดเท่าใดก็ตาม
สตริงที่เข้ารหัส Base64
|
mimeType |
string
ประเภท MIME ของรูปภาพ ค่าที่อนุญาตคือ JPEG , PNG , GIF , BMP , TIFF และการเข้ารหัส Base64 ที่ปลอดภัยสําหรับเว็บ
|
width |
integer
ความกว้างของรูปภาพเป็นพิกเซล
|
height |
integer
ความสูงของรูปภาพเป็นพิกเซล
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-24 UTC
[null,null,["อัปเดตล่าสุด 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. |"]]