Method: albums.addEnrichment

在定義相簿的指定位置加入充實內容。

HTTP 要求

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

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
albumId

string

必要欄位。要新增豐富資訊的專輯 ID。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "newEnrichmentItem": {
    object (NewEnrichmentItem)
  },
  "albumPosition": {
    object (AlbumPosition)
  }
}
欄位
newEnrichmentItem

object (NewEnrichmentItem)

必要欄位。要新增的充實內容。

albumPosition

object (AlbumPosition)

必要欄位。在相簿中插入擴充元素的位置。

回應主體

建立的充實項目。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "enrichmentItem": {
    object (EnrichmentItem)
  }
}
欄位
enrichmentItem

object (EnrichmentItem)

僅供輸出。已新增的充實內容。

授權範圍

需要下列其中一種 OAuth 範圍:

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

NewEnrichmentItem

要加入相簿的新擴充項目項目,由 albums.addEnrichment 呼叫使用。

JSON 表示法
{

  // 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.
}
欄位
聯集欄位 enrichment。要加入相簿中的豐富內容。可以是文字、位置或地圖。enrichment 只能是下列其中一項:
textEnrichment

object (TextEnrichment)

要加到相簿的文字。

locationEnrichment

object (LocationEnrichment)

要新增至相簿的位置資訊。

mapEnrichment

object (MapEnrichment)

要加入相簿的地圖。

TextEnrichment

包含文字的擴充內容。

JSON 表示法
{
  "text": string
}
欄位
text

string

這個充實項目的文字。

LocationEnrichment

包含單一位置的充實內容。

JSON 表示法
{
  "location": {
    object (Location)
  }
}
欄位
location

object (Location)

這個充實項目的位置。

位置

代表實際位置。

JSON 表示法
{
  "locationName": string,
  "latlng": {
    object (LatLng)
  }
}
欄位
locationName

string

地點名稱。

latlng

object (LatLng)

地圖上位置的位置。

LatLng

代表經緯度組合的物件。以一對雙精準數表示經度度數和緯度度數。除非另有指定,否則這個物件必須符合 WGS84 標準。此外,值必須在正規化範圍內。

JSON 表示法
{
  "latitude": number,
  "longitude": number
}
欄位
latitude

number

緯度度數,必須介於 [-90.0, +90.0] 的範圍之間。

longitude

number

經度度數,必須介於 [-180.0, +180.0] 的範圍之間。

MapEnrichment

包含地圖的充實內容,用於顯示起點和目的地位置。

JSON 表示法
{
  "origin": {
    object (Location)
  },
  "destination": {
    object (Location)
  }
}
欄位
origin

object (Location)

這個充實項目的出發地位置。

destination

object (Location)

這個充實項目的目的地。

EnrichmentItem

充實項目。

JSON 表示法
{
  "id": string
}
欄位
id

string

擴充項目的 ID。