- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- NewEnrichmentItem
- TextEnrichment
- LocationEnrichment
- Location
- LatLng
- MapEnrichment
- EnrichmentItem
- Try it!
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 |
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 ( |
Fields | |
---|---|
newEnrichmentItem |
Required. The enrichment to be added. |
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 ( |
Fields | |
---|---|
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 |
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 |
Text to be added to the album. |
locationEnrichment |
Location to be added to the album. |
mapEnrichment |
Map to be added to the album. |
TextEnrichment
An enrichment containing text.
JSON representation |
---|
{ "text": string } |
Fields | |
---|---|
text |
Text for this enrichment item. |
LocationEnrichment
An enrichment containing a single location.
JSON representation |
---|
{
"location": {
object ( |
Fields | |
---|---|
location |
Location for this enrichment item. |
Location
Represents a physical location.
JSON representation |
---|
{
"locationName": string,
"latlng": {
object ( |
Fields | |
---|---|
locationName |
Name of the location to be displayed. |
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 |
The latitude in degrees. It must be in the range [-90.0, +90.0]. |
longitude |
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 ( |
Fields | |
---|---|
origin |
Origin location for this enrichment item. |
destination |
Destination location for this enrichemt item. |
EnrichmentItem
An enrichment item.
JSON representation |
---|
{ "id": string } |
Fields | |
---|---|
id |
Identifier of the enrichment item. |