Przeglądasz starszą dokumentację interfejsu Google Photos Library API.
Method: albums.patch
Zaktualizuj album za pomocą określonego atrybutu id
. Odczytowane są tylko pola id
, title
i coverPhotoMediaItemId
albumu. Album musi zostać utworzony przez dewelopera za pomocą interfejsu API i należeć do użytkownika.
Żądanie HTTP
PATCH https://photoslibrary.googleapis.com/v1/albums/{album.id}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
album.id |
string
Identyfikator albumu. Jest to trwały identyfikator, który może być używany w różnych sesjach do identyfikacji tego albumu.
|
Parametry zapytania
Parametry |
updateMask |
string (FieldMask format)
Wymagane. Wskazać, które pola w podanym albumie mają zostać zaktualizowane. Jedynymi prawidłowymi wartościami są title i coverPhotoMediaItemId . Jest to lista pełnych nazw pól rozdzielona przecinkami. Przykład: "user.displayName,photo" .
|
Treść żądania
Treść żądania zawiera wystąpienie elementu Album
.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Album
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata
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: 2024-11-07 UTC.
[null,null,["Ostatnia aktualizacja: 2024-11-07 UTC."],[[["This API updates an album with a specified ID, modifying only the title and cover photo, if provided in the request."],["The album being updated must have been created by the developer via the API and be owned by the user."],["A `PATCH` request is used, targeting the album's ID in the URL."],["An `updateMask` query parameter is required to specify which album fields (title, coverPhotoMediaItemId) are being updated."],["The request body should contain an `Album` object with the updated fields, and the response, if successful, also contains an `Album` object."]]],["This describes updating an album using a PATCH request to `https://photoslibrary.googleapis.com/v1/albums/{album.id}`. The `album.id` path parameter identifies the target album. The `updateMask` query parameter, with values `title` or `coverPhotoMediaItemId`, specifies which album fields to update. The request body contains the updated album information, while the successful response body returns the updated album. This operation requires the `https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata` authorization scope. Only albums created via the API and owned by the user can be modified.\n"]]