Resource: MediaItem
Representation of a media item (such as a photo or video) in Google Photos.
JSON representation | |
---|---|
{ "id": string, "description": string, "productUrl": string, "baseUrl": string, "mimeType": string, "mediaMetadata": { object ( |
Fields | |
---|---|
id |
Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item. |
description |
Description of the media item. This is shown to the user in the item's info section in the Google Photos app. |
productUrl |
Google Photos URL for the media item. This link is available to the user only if they're signed in. |
baseUrl |
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, |
mimeType |
MIME type of the media item. For example, |
mediaMetadata |
Metadata related to the media item, such as, height, width, or creation time. |
contributorInfo |
Information about the user who created this media item. |
filename |
Filename of the media item. This is shown to the user in the item's info section in the Google Photos app. |
MediaMetadata
Metadata for a media item.
JSON representation | |
---|---|
{ "creationTime": string, "width": string, "height": string, // Union field |
Fields | ||
---|---|---|
creationTime |
Time when the media item was first created (not when it was uploaded to Google Photos). A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: |
|
width |
Original width (in pixels) of the media item. |
|
height |
Original height (in pixels) of the media item. |
|
Union field metadata . Metadata for the media item specific to the underlying media type it represents. metadata can be only one of the following: |
||
photo |
Metadata for a photo media type. |
|
video |
Metadata for a video media type. |
Photo
Metadata that is specific to a photo, such as, ISO, focal length and exposure time. Some of these fields may be null or not included.
JSON representation | |
---|---|
{ "cameraMake": string, "cameraModel": string, "focalLength": number, "apertureFNumber": number, "isoEquivalent": integer, "exposureTime": string } |
Fields | |
---|---|
cameraMake |
Brand of the camera with which the photo was taken. |
cameraModel |
Model of the camera with which the photo was taken. |
focalLength |
Focal length of the camera lens with which the photo was taken. |
apertureFNumber |
Aperture f number of the camera lens with which the photo was taken. |
isoEquivalent |
ISO of the camera with which the photo was taken. |
exposureTime |
Exposure time of the camera aperture when the photo was taken. A duration in seconds with up to nine fractional digits, terminated by ' |
Video
Metadata that is specific to a video, for example, fps and processing status. Some of these fields may be null or not included.
JSON representation | |
---|---|
{
"cameraMake": string,
"cameraModel": string,
"fps": number,
"status": enum ( |
Fields | |
---|---|
cameraMake |
Brand of the camera with which the video was taken. |
cameraModel |
Model of the camera with which the video was taken. |
fps |
Frame rate of the video. |
status |
Processing status of the video. |
VideoProcessingStatus
Processing status of a video being uploaded to Google Photos.
Enums | |
---|---|
UNSPECIFIED |
Video processing status is unknown. |
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 it is now ready for viewing. |
FAILED |
Something has gone wrong and the video has failed to process. |
ContributorInfo
Information about the user who added the media item. Note that this information is included only if the media item is within a shared album created by your app and you have the sharing scope.
JSON representation | |
---|---|
{ "profilePictureBaseUrl": string, "displayName": string } |
Fields | |
---|---|
profilePictureBaseUrl |
URL to the profile picture of the contributor. |
displayName |
Display name of the contributor. |
Methods |
|
---|---|
|
Creates one or more media items in a user's Google Photos library. |
|
Returns the list of media items for the specified media item identifiers. |
|
Returns the media item for the specified media item identifier. |
|
List all media items from a user's Google Photos library. |
|
Searches for media items in a user's Google Photos library. |