pub struct SharedAlbumMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on sharedAlbum resources.
It is not used directly, but through the PhotosLibrary hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_photoslibrary1 as photoslibrary1;
use photoslibrary1::{PhotosLibrary, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = PhotosLibrary::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `get(...)`, `join(...)`, `leave(...)` and `list(...)`
// to build up your call.
let rb = hub.shared_albums();Implementations§
Sourcepub fn get(&self, share_token: &str) -> SharedAlbumGetCall<'a, C>
pub fn get(&self, share_token: &str) -> SharedAlbumGetCall<'a, C>
Create a builder to help you perform the following task:
Beginning March 31, 2025, this method will no longer work. Some or all of the scopes previously used for this method are being removed. Please see Photos APIs updates for more details. Returns the album based on the specified shareToken.
§Arguments
shareToken- Required. Share token of the album to be requested.
Sourcepub fn join(
&self,
request: JoinSharedAlbumRequest,
) -> SharedAlbumJoinCall<'a, C>
pub fn join( &self, request: JoinSharedAlbumRequest, ) -> SharedAlbumJoinCall<'a, C>
Create a builder to help you perform the following task:
Joins a shared album on behalf of the Google Photos user.
§Arguments
request- No description provided.
Sourcepub fn leave(
&self,
request: LeaveSharedAlbumRequest,
) -> SharedAlbumLeaveCall<'a, C>
pub fn leave( &self, request: LeaveSharedAlbumRequest, ) -> SharedAlbumLeaveCall<'a, C>
Create a builder to help you perform the following task:
Leaves a previously-joined shared album on behalf of the Google Photos user. The user must not own this album.
§Arguments
request- No description provided.
Sourcepub fn list(&self) -> SharedAlbumListCall<'a, C>
pub fn list(&self) -> SharedAlbumListCall<'a, C>
Create a builder to help you perform the following task:
Lists all shared albums available in the Sharing tab of the user’s Google Photos app.