Class PhotosLibraryGrpc.PhotosLibraryFutureStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<PhotosLibraryGrpc.PhotosLibraryFutureStub>
-
- com.google.photos.library.v1.proto.PhotosLibraryGrpc.PhotosLibraryFutureStub
-
- Enclosing class:
- PhotosLibraryGrpc
public static final class PhotosLibraryGrpc.PhotosLibraryFutureStub extends io.grpc.stub.AbstractStub<PhotosLibraryGrpc.PhotosLibraryFutureStub>
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.util.concurrent.ListenableFuture<AddEnrichmentToAlbumResponse>
addEnrichmentToAlbum(AddEnrichmentToAlbumRequest request)
Adds an enrichment at a specified position in a defined album.com.google.common.util.concurrent.ListenableFuture<BatchAddMediaItemsToAlbumResponse>
batchAddMediaItemsToAlbum(BatchAddMediaItemsToAlbumRequest request)
Adds one or more media items in a user's Google Photos library to an album.com.google.common.util.concurrent.ListenableFuture<BatchCreateMediaItemsResponse>
batchCreateMediaItems(BatchCreateMediaItemsRequest request)
Creates one or more media items in a user's Google Photos library.com.google.common.util.concurrent.ListenableFuture<BatchGetMediaItemsResponse>
batchGetMediaItems(BatchGetMediaItemsRequest request)
Returns the list of media items for the specified media item identifiers.com.google.common.util.concurrent.ListenableFuture<BatchRemoveMediaItemsFromAlbumResponse>
batchRemoveMediaItemsFromAlbum(BatchRemoveMediaItemsFromAlbumRequest request)
Removes one or more media items from a specified album.protected PhotosLibraryGrpc.PhotosLibraryFutureStub
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
com.google.common.util.concurrent.ListenableFuture<Album>
createAlbum(CreateAlbumRequest request)
Creates an album in a user's Google Photos library.com.google.common.util.concurrent.ListenableFuture<Album>
getAlbum(GetAlbumRequest request)
Returns the album based on the specified `albumId`.com.google.common.util.concurrent.ListenableFuture<MediaItem>
getMediaItem(GetMediaItemRequest request)
Returns the media item for the specified media item identifier.com.google.common.util.concurrent.ListenableFuture<Album>
getSharedAlbum(GetSharedAlbumRequest request)
Returns the album based on the specified `shareToken`.com.google.common.util.concurrent.ListenableFuture<JoinSharedAlbumResponse>
joinSharedAlbum(JoinSharedAlbumRequest request)
Joins a shared album on behalf of the Google Photos user.com.google.common.util.concurrent.ListenableFuture<LeaveSharedAlbumResponse>
leaveSharedAlbum(LeaveSharedAlbumRequest request)
Leaves a previously-joined shared album on behalf of the Google Photos user.com.google.common.util.concurrent.ListenableFuture<ListAlbumsResponse>
listAlbums(ListAlbumsRequest request)
Lists all albums shown to a user in the Albums tab of the Google Photos app.com.google.common.util.concurrent.ListenableFuture<ListMediaItemsResponse>
listMediaItems(ListMediaItemsRequest request)
List all media items from a user's Google Photos library.com.google.common.util.concurrent.ListenableFuture<ListSharedAlbumsResponse>
listSharedAlbums(ListSharedAlbumsRequest request)
Lists all shared albums available in the Sharing tab of the user's Google Photos app.com.google.common.util.concurrent.ListenableFuture<SearchMediaItemsResponse>
searchMediaItems(SearchMediaItemsRequest request)
Searches for media items in a user's Google Photos library.com.google.common.util.concurrent.ListenableFuture<ShareAlbumResponse>
shareAlbum(ShareAlbumRequest request)
Marks an album as shared and accessible to other users.com.google.common.util.concurrent.ListenableFuture<UnshareAlbumResponse>
unshareAlbum(UnshareAlbumRequest request)
Marks a previously shared album as private.
-
-
-
Method Detail
-
build
protected PhotosLibraryGrpc.PhotosLibraryFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
build
in classio.grpc.stub.AbstractStub<PhotosLibraryGrpc.PhotosLibraryFutureStub>
-
createAlbum
public com.google.common.util.concurrent.ListenableFuture<Album> createAlbum(CreateAlbumRequest request)
Creates an album in a user's Google Photos library.
-
batchCreateMediaItems
public com.google.common.util.concurrent.ListenableFuture<BatchCreateMediaItemsResponse> batchCreateMediaItems(BatchCreateMediaItemsRequest request)
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 com.google.common.util.concurrent.ListenableFuture<BatchAddMediaItemsToAlbumResponse> batchAddMediaItemsToAlbum(BatchAddMediaItemsToAlbumRequest request)
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 com.google.common.util.concurrent.ListenableFuture<SearchMediaItemsResponse> searchMediaItems(SearchMediaItemsRequest request)
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 com.google.common.util.concurrent.ListenableFuture<ListMediaItemsResponse> listMediaItems(ListMediaItemsRequest request)
List all media items from a user's Google Photos library.
-
getMediaItem
public com.google.common.util.concurrent.ListenableFuture<MediaItem> getMediaItem(GetMediaItemRequest request)
Returns the media item for the specified media item identifier.
-
batchGetMediaItems
public com.google.common.util.concurrent.ListenableFuture<BatchGetMediaItemsResponse> batchGetMediaItems(BatchGetMediaItemsRequest request)
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 com.google.common.util.concurrent.ListenableFuture<ListAlbumsResponse> listAlbums(ListAlbumsRequest request)
Lists all albums shown to a user in the Albums tab of the Google Photos app.
-
getAlbum
public com.google.common.util.concurrent.ListenableFuture<Album> getAlbum(GetAlbumRequest request)
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 com.google.common.util.concurrent.ListenableFuture<Album> getSharedAlbum(GetSharedAlbumRequest request)
Returns the album based on the specified `shareToken`.
-
addEnrichmentToAlbum
public com.google.common.util.concurrent.ListenableFuture<AddEnrichmentToAlbumResponse> addEnrichmentToAlbum(AddEnrichmentToAlbumRequest request)
Adds an enrichment at a specified position in a defined album.
-
joinSharedAlbum
public com.google.common.util.concurrent.ListenableFuture<JoinSharedAlbumResponse> joinSharedAlbum(JoinSharedAlbumRequest request)
Joins a shared album on behalf of the Google Photos user.
-
leaveSharedAlbum
public com.google.common.util.concurrent.ListenableFuture<LeaveSharedAlbumResponse> leaveSharedAlbum(LeaveSharedAlbumRequest request)
Leaves a previously-joined shared album on behalf of the Google Photos user. The user must not own this album.
-
shareAlbum
public com.google.common.util.concurrent.ListenableFuture<ShareAlbumResponse> shareAlbum(ShareAlbumRequest request)
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 com.google.common.util.concurrent.ListenableFuture<ListSharedAlbumsResponse> listSharedAlbums(ListSharedAlbumsRequest request)
Lists all shared albums available in the Sharing tab of the user's Google Photos app.
-
unshareAlbum
public com.google.common.util.concurrent.ListenableFuture<UnshareAlbumResponse> unshareAlbum(UnshareAlbumRequest request)
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 com.google.common.util.concurrent.ListenableFuture<BatchRemoveMediaItemsFromAlbumResponse> batchRemoveMediaItemsFromAlbum(BatchRemoveMediaItemsFromAlbumRequest request)
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.
-
-