Method: albums.addEnrichment

Adds an enrichment at a specified position in a defined album.

HTTP request

POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:addEnrichment

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
albumId

string

Required. Identifier of the album where the enrichment is to be added.

Request body

The request body contains data with the following structure:

JSON representation
{
  "newEnrichmentItem": {
    object (NewEnrichmentItem)
  },
  "albumPosition": {
    object (AlbumPosition)
  }
}
Fields
newEnrichmentItem

object (NewEnrichmentItem)

Required. The enrichment to be added.

albumPosition

object (AlbumPosition)

Required. The position in the album where the enrichment is to be inserted.

Response body

The enrichment item that's created.

If successful, the response body contains data with the following structure:

JSON representation
{
  "enrichmentItem": {
    object (EnrichmentItem)
  }
}
Fields
enrichmentItem

object (EnrichmentItem)

Output only. Enrichment which was added.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/photoslibrary
  • https://www.googleapis.com/auth/photoslibrary.appendonly
  • https://www.googleapis.com/auth/photoslibrary.sharing

NewEnrichmentItem

A new enrichment item to be added to an album, used by the albums.addEnrichment call.

JSON representation
{

  // Union field enrichment can be only one of the following:
  "textEnrichment": {
    object (TextEnrichment)
  },
  "locationEnrichment": {
    object (LocationEnrichment)
  },
  "mapEnrichment": {
    object (MapEnrichment)
  }
  // End of list of possible types for union field enrichment.
}
Fields
Union field enrichment. Enrichment to be added to the album. This could be either a text, location, or a map. enrichment can be only one of the following:
textEnrichment

object (TextEnrichment)

Text to be added to the album.

locationEnrichment

object (LocationEnrichment)

Location to be added to the album.

mapEnrichment

object (MapEnrichment)

Map to be added to the album.

TextEnrichment

An enrichment containing text.

JSON representation
{
  "text": string
}
Fields
text

string

Text for this enrichment item.

LocationEnrichment

An enrichment containing a single location.

JSON representation
{
  "location": {
    object (Location)
  }
}
Fields
location

object (Location)

Location for this enrichment item.

Location

Represents a physical location.

JSON representation
{
  "locationName": string,
  "latlng": {
    object (LatLng)
  }
}
Fields
locationName

string

Name of the location to be displayed.

latlng

object (LatLng)

Position of the location on the map.

LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

JSON representation
{
  "latitude": number,
  "longitude": number
}
Fields
latitude

number

The latitude in degrees. It must be in the range [-90.0, +90.0].

longitude

number

The longitude in degrees. It must be in the range [-180.0, +180.0].

MapEnrichment

An enrichment containing a map, showing origin and destination locations.

JSON representation
{
  "origin": {
    object (Location)
  },
  "destination": {
    object (Location)
  }
}
Fields
origin

object (Location)

Origin location for this enrichment item.

destination

object (Location)

Destination location for this enrichemt item.

EnrichmentItem

An enrichment item.

JSON representation
{
  "id": string
}
Fields
id

string

Identifier of the enrichment item.