Struct google_photoslibrary1::api::MediaItemMethods[][src]

pub struct MediaItemMethods<'a, C> where
    C: 'a, 
{ /* fields omitted */ }

A builder providing access to all methods supported on mediaItem 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 yup_oauth2 as oauth2;
extern crate google_photoslibrary1 as photoslibrary1;
 
use std::default::Default;
use oauth2;
use photoslibrary1::PhotosLibrary;
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
        secret,
        yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = PhotosLibrary::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `batch_create(...)`, `batch_get(...)`, `get(...)`, `list(...)`, `patch(...)` and `search(...)`
// to build up your call.
let rb = hub.media_items();

Implementations

impl<'a, C> MediaItemMethods<'a, C>[src]

pub fn batch_create(
    &self,
    request: BatchCreateMediaItemsRequest
) -> MediaItemBatchCreateCall<'a, C>
[src]

Create a builder to help you perform the following task:

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.

Arguments

  • request - No description provided.

pub fn batch_get(&self) -> MediaItemBatchGetCall<'a, C>[src]

Create a builder to help you perform the following task:

Returns the list of media items for the specified media item identifiers. Items are returned in the same order as the supplied identifiers.

pub fn get(&self, media_item_id: &str) -> MediaItemGetCall<'a, C>[src]

Create a builder to help you perform the following task:

Returns the media item for the specified media item identifier.

Arguments

  • mediaItemId - Required. Identifier of the media item to be requested.

pub fn list(&self) -> MediaItemListCall<'a, C>[src]

Create a builder to help you perform the following task:

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

pub fn patch(&self, request: MediaItem, id: &str) -> MediaItemPatchCall<'a, C>[src]

Create a builder to help you perform the following task:

Update the media item with the specified id. Only the id and description fields of the media item are read. The media item must have been created by the developer via the API and must be owned by the user.

Arguments

  • request - No description provided.
  • id - Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item.

pub fn search(
    &self,
    request: SearchMediaItemsRequest
) -> MediaItemSearchCall<'a, C>
[src]

Create a builder to help you perform the following task:

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.

Arguments

  • request - No description provided.

Trait Implementations

impl<'a, C> MethodsBuilder for MediaItemMethods<'a, C>[src]

Auto Trait Implementations

impl<'a, C> !RefUnwindSafe for MediaItemMethods<'a, C>

impl<'a, C> !Send for MediaItemMethods<'a, C>

impl<'a, C> !Sync for MediaItemMethods<'a, C>

impl<'a, C> Unpin for MediaItemMethods<'a, C>

impl<'a, C> !UnwindSafe for MediaItemMethods<'a, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.