Method: albums.patch
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Perbarui album yang dibuat aplikasi dengan id
yang ditentukan. Hanya kolom id
, title
, dan coverPhotoMediaItemId
album yang dibaca. Album harus telah dibuat oleh developer melalui API.
Permintaan HTTP
PATCH https://photoslibrary.googleapis.com/v1/albums/{album.id}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
album.id |
string
ID untuk album. Ini adalah ID persisten yang dapat digunakan di antara sesi untuk mengidentifikasi album ini.
|
Parameter kueri
Parameter |
updateMask |
string (FieldMask format)
Wajib. Menunjukkan kolom apa di album yang diberikan yang akan diperbarui. Satu-satunya nilai yang valid adalah title dan coverPhotoMediaItemId . Ini adalah daftar dipisahkan koma yang berisi nama-nama kolom yang sepenuhnya memenuhi syarat. Contoh: "user.displayName,photo" .
|
Isi permintaan
Isi permintaan memuat instance Album
.
Isi respons
Jika berhasil, isi respons memuat instance Album
.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut:
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-04-01 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-04-01 UTC."],[[["This endpoint allows you to update an album's `title` and `coverPhotoMediaItemId` using a `PATCH` request to `https://photoslibrary.googleapis.com/v1/albums/{album.id}`."],["The album must have been created by the developer via the API and be owned by the user."],["You need to specify the fields to be updated using the `updateMask` query parameter and provide the updated album data in the request body."],["The request requires authorization with the `https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata` scope."]]],["To update an album, use a `PATCH` request to the specified URL, including the `album.id` as a path parameter. The `updateMask` query parameter is required to specify fields to update, which can be `title` or `coverPhotoMediaItemId`. The request body contains the album data. The response body returns the updated album. Authorization requires the `https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata` scope. The provided album must have been created by the developer via the API and owned by the user.\n"]]