Method: albums.patch
Memperbarui album dengan id
yang ditentukan. Hanya kolom id
, title
, dan coverPhotoMediaItemId
dari album yang dibaca. Album harus dibuat oleh developer melalui API dan harus dimiliki oleh pengguna.
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 pengenal tetap yang dapat digunakan di antara sesi untuk mengidentifikasi album ini.
|
Parameter kueri
Parameter |
updateMask |
string (FieldMask format)
Wajib. Tunjukkan kolom mana di album yang tersedia yang akan diperbarui. Satu-satunya nilai yang valid adalah title dan coverPhotoMediaItemId . Ini adalah daftar yang dipisahkan koma yang berisi nama kolom yang sepenuhnya memenuhi syarat. Contoh: "user.displayName,photo" .
|
Isi permintaan
Isi permintaan memuat instance Album
.
Isi respons
Jika berhasil, isi respons akan berisi instance Album
.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut ini:
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 2024-04-03 UTC.
[null,null,["Terakhir diperbarui pada 2024-04-03 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"]]