\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()
BatchAddMediaItemsToAlbum()
SearchMediaItems()
ListMediaItems()
GetMediaItem()
BatchGetMediaItems()
ListAlbums()
GetAlbum()
GetSharedAlbum()
AddEnrichmentToAlbum()
JoinSharedAlbum()
LeaveSharedAlbum()
ShareAlbum()
ListSharedAlbums()
UnshareAlbum()
BatchRemoveMediaItemsFromAlbum()
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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Parameters

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

input argument

array $metadata

metadata

array $options

call options

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

BatchAddMediaItemsToAlbum()

BatchAddMediaItemsToAlbum(\Google\Photos\Library\V1\BatchAddMediaItemsToAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

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.

Parameters

\Google\Photos\Library\V1\BatchAddMediaItemsToAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

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

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

BatchRemoveMediaItemsFromAlbum()

BatchRemoveMediaItemsFromAlbum(\Google\Photos\Library\V1\BatchRemoveMediaItemsFromAlbumRequest  $argument, array  $metadata = array(), array  $options = array()) 

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.

Parameters

\Google\Photos\Library\V1\BatchRemoveMediaItemsFromAlbumRequest $argument

input argument

array $metadata

metadata

array $options

call options

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275