unshare method
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.
request
- The metadata request object.
Request parameters:
albumId
- Required. Identifier of the album to be unshared. This album
id must belong to an album created by the developer.
Value must have pattern ^\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a UnshareAlbumResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<UnshareAlbumResponse> unshare(
UnshareAlbumRequest request,
core.String albumId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/albums/' + core.Uri.encodeFull('$albumId') + ':unshare';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return UnshareAlbumResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}