Struct google_photoslibrary1::api::MediaItem
source · pub struct MediaItem {
pub base_url: Option<String>,
pub contributor_info: Option<ContributorInfo>,
pub description: Option<String>,
pub filename: Option<String>,
pub id: Option<String>,
pub media_metadata: Option<MediaMetadata>,
pub mime_type: Option<String>,
pub product_url: Option<String>,
}
Expand description
Representation of a media item (such as a photo or video) in Google Photos.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- batch create media items (none)
- batch get media items (none)
- get media items (response)
- list media items (none)
- patch media items (request|response)
- search media items (none)
Fields§
§base_url: Option<String>
A URL to the media item’s bytes. This shouldn’t be used as is. Parameters should be appended to this URL before use. See the developer documentation for a complete list of supported parameters. For example, '=w2048-h1024'
will set the dimensions of a media item of type photo to have a width of 2048 px and height of 1024 px.
contributor_info: Option<ContributorInfo>
Information about the user who added this media item. Note that this is only included when using mediaItems.search with the ID of a shared album. The album must be created by your app and you must have the sharing scope.
description: Option<String>
Description of the media item. This is shown to the user in the item’s info section in the Google Photos app. Must be shorter than 1000 characters. Only include text written by users. Descriptions should add context and help users understand media. Do not include any auto-generated strings such as filenames, tags, and other metadata.
filename: Option<String>
Filename of the media item. This is shown to the user in the item’s info section in the Google Photos app.
id: Option<String>
Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item.
media_metadata: Option<MediaMetadata>
Metadata related to the media item, such as, height, width, or creation time.
mime_type: Option<String>
MIME type of the media item. For example, image/jpeg
.
product_url: Option<String>
Google Photos URL for the media item. This link is available to the user only if they’re signed in. When retrieved from an album search, the URL points to the item inside the album.