\Google\Photos\Library\V1PhotosLibraryGrpcClient

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

Summary

Methods
Properties
Constants
__construct()
CreateAlbum()
BatchCreateMediaItems()
SearchMediaItems()
ListMediaItems()
GetMediaItem()
BatchGetMediaItems()
ListAlbums()
GetAlbum()
GetSharedAlbum()
AddEnrichmentToAlbum()
JoinSharedAlbum()
LeaveSharedAlbum()
ShareAlbum()
ListSharedAlbums()
UnshareAlbum()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $hostname, array  $opts, \Grpc\Channel  $channel = null) 

Parameters

string $hostname

hostname

array $opts

channel options

\Grpc\Channel $channel

(optional) re-use channel object

CreateAlbum()

CreateAlbum(\Google\Photos\Library\V1\CreateAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

Creates an album in a user's Google Photos library.

Parameters

\Google\Photos\Library\V1\CreateAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

BatchCreateMediaItems()

BatchCreateMediaItems(\Google\Photos\Library\V1\BatchCreateMediaItemsRequest  $argument, array  $metadata = array(), array  $options = array()) 

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 Uploading media.

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. 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.

Parameters

\Google\Photos\Library\V1\BatchCreateMediaItemsRequest $argument

input argument

array $metadata

metadata

array $options

call options

SearchMediaItems()

SearchMediaItems(\Google\Photos\Library\V1\SearchMediaItemsRequest  $argument, array  $metadata = array(), array  $options = array()) 

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.

Parameters

\Google\Photos\Library\V1\SearchMediaItemsRequest $argument

input argument

array $metadata

metadata

array $options

call options

ListMediaItems()

ListMediaItems(\Google\Photos\Library\V1\ListMediaItemsRequest  $argument, array  $metadata = array(), array  $options = array()) 

List all media items from a user's Google Photos library.

Parameters

\Google\Photos\Library\V1\ListMediaItemsRequest $argument

input argument

array $metadata

metadata

array $options

call options

GetMediaItem()

GetMediaItem(\Google\Photos\Library\V1\GetMediaItemRequest  $argument, array  $metadata = array(), array  $options = array()) 

Returns the media item for the specified media item identifier.

Parameters

\Google\Photos\Library\V1\GetMediaItemRequest $argument

input argument

array $metadata

metadata

array $options

call options

BatchGetMediaItems()

BatchGetMediaItems(\Google\Photos\Library\V1\BatchGetMediaItemsRequest  $argument, array  $metadata = array(), array  $options = array()) 

Returns the list of media items for the specified media item identifiers.

Items are returned in the same order as the supplied identifiers.

Parameters

\Google\Photos\Library\V1\BatchGetMediaItemsRequest $argument

input argument

array $metadata

metadata

array $options

call options

ListAlbums()

ListAlbums(\Google\Photos\Library\V1\ListAlbumsRequest  $argument, array  $metadata = array(), array  $options = array()) 

Lists all albums shown to a user in the Albums tab of the Google Photos app.

Parameters

\Google\Photos\Library\V1\ListAlbumsRequest $argument

input argument

array $metadata

metadata

array $options

call options

GetAlbum()

GetAlbum(\Google\Photos\Library\V1\GetAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

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.

Parameters

\Google\Photos\Library\V1\GetAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

GetSharedAlbum()

GetSharedAlbum(\Google\Photos\Library\V1\GetSharedAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

Returns the album based on the specified `shareToken`.

Parameters

\Google\Photos\Library\V1\GetSharedAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

AddEnrichmentToAlbum()

AddEnrichmentToAlbum(\Google\Photos\Library\V1\AddEnrichmentToAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

Adds an enrichment at a specified position in a defined album.

Parameters

\Google\Photos\Library\V1\AddEnrichmentToAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

JoinSharedAlbum()

JoinSharedAlbum(\Google\Photos\Library\V1\JoinSharedAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

Joins a shared album on behalf of the Google Photos user.

Parameters

\Google\Photos\Library\V1\JoinSharedAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

LeaveSharedAlbum()

LeaveSharedAlbum(\Google\Photos\Library\V1\LeaveSharedAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

Leaves a previously-joined shared album on behalf of the Google Photos user. The user must not own this album.

Parameters

\Google\Photos\Library\V1\LeaveSharedAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

ShareAlbum()

ShareAlbum(\Google\Photos\Library\V1\ShareAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

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.

Parameters

\Google\Photos\Library\V1\ShareAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

ListSharedAlbums()

ListSharedAlbums(\Google\Photos\Library\V1\ListSharedAlbumsRequest  $argument, array  $metadata = array(), array  $options = array()) 

Lists all shared albums available in the Sharing tab of the user's Google Photos app.

Parameters

\Google\Photos\Library\V1\ListSharedAlbumsRequest $argument

input argument

array $metadata

metadata

array $options

call options

UnshareAlbum()

UnshareAlbum(\Google\Photos\Library\V1\UnshareAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

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.

Parameters

\Google\Photos\Library\V1\UnshareAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options