REST Resource: mediaItems

Resource: PickedMediaItem

Representation of a photo or video that was picked by the user.

JSON representation
 { 
 "id" 
 : 
 string 
 , 
 "createTime" 
 : 
 string 
 , 
 "type" 
 : 
 enum (  Type 
 
) 
 , 
 "mediaFile" 
 : 
 { 
 object (  MediaFile 
 
) 
 } 
 } 
Fields
id

string

Identifier for the media item.

This is a persistent identifier that can be used between sessions to identify this media item.

createTime

string ( Timestamp format)

Time when the media item was created (not when it was uploaded to Google Photos).

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .

type

enum ( Type )

The type of this media item.

mediaFile

object ( MediaFile )

The media file that constitutes this media item.

Type

The type of a media item.

Enums
TYPE_UNSPECIFIED The type is not specified.
PHOTO The media item represents a photo.
VIDEO The media item represents a video.

MediaFile

Representation of a media file.

JSON representation
 { 
 "baseUrl" 
 : 
 string 
 , 
 "mimeType" 
 : 
 string 
 , 
 "filename" 
 : 
 string 
 , 
 "mediaFileMetadata" 
 : 
 { 
 object (  MediaFileMetadata 
 
) 
 } 
 } 
Fields
baseUrl

string

A URL to fetch the media file's bytes.

To download a media file, the API client must add the parameters specified in the developer documentation to this URL.

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.

mimeType

string

MIME type of the media file. For example, image/jpeg .

filename

string

Filename of the media file.

VideoProcessingStatus

Processing status of a video stored in Google Photos.

Enums
UNSPECIFIED Video processing status is not specified.
PROCESSING

Video is being processed.

The user sees an icon for this video in the Google Photos app; however, it isn't playable yet.

READY

Video processing is complete and this video is now ready for viewing.

Attempting to download a video not in the READY state may fail.

FAILED Something has gone wrong and the video has failed to process.

Methods

list

Returns a list of media items picked by the user during the specified session.
Create a Mobile Website
View Site in Mobile | Classic
Share by: