Class PhotosLibraryGrpc.PhotosLibraryImplBase
- java.lang.Object
-
- com.google.photos.library.v1.proto.PhotosLibraryGrpc.PhotosLibraryImplBase
-
- All Implemented Interfaces:
io.grpc.BindableService
- Enclosing class:
- PhotosLibraryGrpc
public abstract static class PhotosLibraryGrpc.PhotosLibraryImplBase extends java.lang.Object implements io.grpc.BindableService
Service which allows developers to perform the following actions on behalf of the user: - upload media items directly to their Google Photos library - create albums - add media items (including album enrichments) to albums - list and download content from their Google Photos library - filter results by media type, date range or content category - create, join, and access shared albums
-
-
Constructor Summary
Constructors Constructor Description PhotosLibraryImplBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEnrichmentToAlbum(AddEnrichmentToAlbumRequest request, io.grpc.stub.StreamObserver<AddEnrichmentToAlbumResponse> responseObserver)
Adds an enrichment at a specified position in a defined album.void
batchAddMediaItemsToAlbum(BatchAddMediaItemsToAlbumRequest request, io.grpc.stub.StreamObserver<BatchAddMediaItemsToAlbumResponse> responseObserver)
Adds one or more media items in a user's Google Photos library to an album.void
batchCreateMediaItems(BatchCreateMediaItemsRequest request, io.grpc.stub.StreamObserver<BatchCreateMediaItemsResponse> responseObserver)
Creates one or more media items in a user's Google Photos library.void
batchGetMediaItems(BatchGetMediaItemsRequest request, io.grpc.stub.StreamObserver<BatchGetMediaItemsResponse> responseObserver)
Returns the list of media items for the specified media item identifiers.void
batchRemoveMediaItemsFromAlbum(BatchRemoveMediaItemsFromAlbumRequest request, io.grpc.stub.StreamObserver<BatchRemoveMediaItemsFromAlbumResponse> responseObserver)
Removes one or more media items from a specified album.io.grpc.ServerServiceDefinition
bindService()
void
createAlbum(CreateAlbumRequest request, io.grpc.stub.StreamObserver<Album> responseObserver)
Creates an album in a user's Google Photos library.void
getAlbum(GetAlbumRequest request, io.grpc.stub.StreamObserver<Album> responseObserver)
Returns the album based on the specified `albumId`.void
getMediaItem(GetMediaItemRequest request, io.grpc.stub.StreamObserver<MediaItem> responseObserver)
Returns the media item for the specified media item identifier.void
getSharedAlbum(GetSharedAlbumRequest request, io.grpc.stub.StreamObserver<Album> responseObserver)
Returns the album based on the specified `shareToken`.void
joinSharedAlbum(JoinSharedAlbumRequest request, io.grpc.stub.StreamObserver<JoinSharedAlbumResponse> responseObserver)
Joins a shared album on behalf of the Google Photos user.void
leaveSharedAlbum(LeaveSharedAlbumRequest request, io.grpc.stub.StreamObserver<LeaveSharedAlbumResponse> responseObserver)
Leaves a previously-joined shared album on behalf of the Google Photos user.void
listAlbums(ListAlbumsRequest request, io.grpc.stub.StreamObserver<ListAlbumsResponse> responseObserver)
Lists all albums shown to a user in the Albums tab of the Google Photos app.void
listMediaItems(ListMediaItemsRequest request, io.grpc.stub.StreamObserver<ListMediaItemsResponse> responseObserver)
List all media items from a user's Google Photos library.void
listSharedAlbums(ListSharedAlbumsRequest request, io.grpc.stub.StreamObserver<ListSharedAlbumsResponse> responseObserver)
Lists all shared albums available in the Sharing tab of the user's Google Photos app.void
searchMediaItems(SearchMediaItemsRequest request, io.grpc.stub.StreamObserver<SearchMediaItemsResponse> responseObserver)
Searches for media items in a user's Google Photos library.void
shareAlbum(ShareAlbumRequest request, io.grpc.stub.StreamObserver<ShareAlbumResponse> responseObserver)
Marks an album as shared and accessible to other users.void
unshareAlbum(UnshareAlbumRequest request, io.grpc.stub.StreamObserver<UnshareAlbumResponse> responseObserver)
Marks a previously shared album as private.
-
-
-
Method Detail
-
createAlbum
public void createAlbum(CreateAlbumRequest request, io.grpc.stub.StreamObserver<Album> responseObserver)
Creates an album in a user's Google Photos library.
-
batchCreateMediaItems
public void batchCreateMediaItems(BatchCreateMediaItemsRequest request, io.grpc.stub.StreamObserver<BatchCreateMediaItemsResponse> responseObserver)
Creates one or more media items in a user's Google Photos library. This is the second step for creating a media item. For details regarding Step 1, uploading the raw bytes to a Google Server, see <a href="/photos/library/guides/upload-media">Uploading media</a>. This call adds the media item to the library. If an album `id` is specified, the call adds the media item to the album too. Each album can contain up to 20,000 media items. By default, the media item will be added to the end of the library or album. If an album `id` and position are both defined, the media item is added to the album at the specified position. If the call contains multiple media items, they're added at the specified position. If you are creating a media item in a shared album where you are not the owner, you are not allowed to position the media item. Doing so will result in a `BAD REQUEST` error.
-
batchAddMediaItemsToAlbum
public void batchAddMediaItemsToAlbum(BatchAddMediaItemsToAlbumRequest request, io.grpc.stub.StreamObserver<BatchAddMediaItemsToAlbumResponse> responseObserver)
Adds one or more media items in a user's Google Photos library to an album. The media items and albums must have been created by the developer via the API. Media items are added to the end of the album. If multiple media items are given, they are added in the order specified in this call. Each album can contain up to 20,000 media items. Only media items that are in the user's library can be added to an album. For albums that are shared, the album must either be owned by the user or the user must have joined the album as a collaborator. Partial success is not supported. The entire request will fail if an invalid media item or album is specified.
-
searchMediaItems
public void searchMediaItems(SearchMediaItemsRequest request, io.grpc.stub.StreamObserver<SearchMediaItemsResponse> responseObserver)
Searches for media items in a user's Google Photos library. If no filters are set, then all media items in the user's library are returned. If an album is set, all media items in the specified album are returned. If filters are specified, media items that match the filters from the user's library are listed. If you set both the album and the filters, the request results in an error.
-
listMediaItems
public void listMediaItems(ListMediaItemsRequest request, io.grpc.stub.StreamObserver<ListMediaItemsResponse> responseObserver)
List all media items from a user's Google Photos library.
-
getMediaItem
public void getMediaItem(GetMediaItemRequest request, io.grpc.stub.StreamObserver<MediaItem> responseObserver)
Returns the media item for the specified media item identifier.
-
batchGetMediaItems
public void batchGetMediaItems(BatchGetMediaItemsRequest request, io.grpc.stub.StreamObserver<BatchGetMediaItemsResponse> responseObserver)
Returns the list of media items for the specified media item identifiers. Items are returned in the same order as the supplied identifiers.
-
listAlbums
public void listAlbums(ListAlbumsRequest request, io.grpc.stub.StreamObserver<ListAlbumsResponse> responseObserver)
Lists all albums shown to a user in the Albums tab of the Google Photos app.
-
getAlbum
public void getAlbum(GetAlbumRequest request, io.grpc.stub.StreamObserver<Album> responseObserver)
Returns the album based on the specified `albumId`. The `albumId` must be the ID of an album owned by the user or a shared album that the user has joined.
-
getSharedAlbum
public void getSharedAlbum(GetSharedAlbumRequest request, io.grpc.stub.StreamObserver<Album> responseObserver)
Returns the album based on the specified `shareToken`.
-
addEnrichmentToAlbum
public void addEnrichmentToAlbum(AddEnrichmentToAlbumRequest request, io.grpc.stub.StreamObserver<AddEnrichmentToAlbumResponse> responseObserver)
Adds an enrichment at a specified position in a defined album.
-
joinSharedAlbum
public void joinSharedAlbum(JoinSharedAlbumRequest request, io.grpc.stub.StreamObserver<JoinSharedAlbumResponse> responseObserver)
Joins a shared album on behalf of the Google Photos user.
-
leaveSharedAlbum
public void leaveSharedAlbum(LeaveSharedAlbumRequest request, io.grpc.stub.StreamObserver<LeaveSharedAlbumResponse> responseObserver)
Leaves a previously-joined shared album on behalf of the Google Photos user. The user must not own this album.
-
shareAlbum
public void shareAlbum(ShareAlbumRequest request, io.grpc.stub.StreamObserver<ShareAlbumResponse> responseObserver)
Marks an album as shared and accessible to other users. This action can only be performed on albums which were created by the developer via the API.
-
listSharedAlbums
public void listSharedAlbums(ListSharedAlbumsRequest request, io.grpc.stub.StreamObserver<ListSharedAlbumsResponse> responseObserver)
Lists all shared albums available in the Sharing tab of the user's Google Photos app.
-
unshareAlbum
public void unshareAlbum(UnshareAlbumRequest request, io.grpc.stub.StreamObserver<UnshareAlbumResponse> responseObserver)
Marks a previously shared album as private. This means that the album is no longer shared and all the non-owners will lose access to the album. All non-owner content will be removed from the album. If a non-owner has previously added the album to their library, they will retain all photos in their library. This action can only be performed on albums which were created by the developer via the API.
-
batchRemoveMediaItemsFromAlbum
public void batchRemoveMediaItemsFromAlbum(BatchRemoveMediaItemsFromAlbumRequest request, io.grpc.stub.StreamObserver<BatchRemoveMediaItemsFromAlbumResponse> responseObserver)
Removes one or more media items from a specified album. The media items and the album must have been created by the developer via the API. For albums that are shared, this action is only supported for media items that were added to the album by this user, or for all media items if the album was created by this user. Partial success is not supported. The entire request will fail and no action will be performed on the album if an invalid media item or album is specified.
-
bindService
public final io.grpc.ServerServiceDefinition bindService()
- Specified by:
bindService
in interfaceio.grpc.BindableService
-
-