REST Resource: resources.buildings

资源:建筑物

公共 API:Resources.buildings

JSON 表示法
{
  "buildingId": string,
  "buildingName": string,
  "description": string,
  "coordinates": {
    object (BuildingCoordinates)
  },
  "kind": string,
  "etags": string,
  "floorNames": [
    string
  ],
  "address": {
    object (BuildingAddress)
  }
}
字段
buildingId

string

建筑物的唯一标识符。长度上限为 100 个字符。

buildingName

string

用户在 Google 日历中看到的建筑物名称。对于客户而言必须唯一。例如,“NYC-CHEL”。长度上限为 100 个字符。

description

string

建筑物的简要说明。例如,“Chelsea Market”。

coordinates

object (BuildingCoordinates)

建筑物中心的地理坐标,以十进制度数表示的纬度和经度。

kind

string

此资源的种类。

etags

string

资源的 ETag。

floorNames[]

string

此建筑物中所有楼层的显示名称。楼层应按从低到高的顺序升序排序。例如,["B2", "B1", "L", "1", "2", "2M", "3", "PH"] 必须至少包含一个条目。

address

object (BuildingAddress)

建筑物的邮政地址。如需了解详情,请参阅 PostalAddress。请注意,只需一个地址行和区域代码。

BuildingCoordinates

公共 API:Resources.buildings

JSON 表示法
{
  "latitude": number,
  "longitude": number
}
字段
latitude

number

纬度(以十进制度为单位)。

longitude

number

经度(以十进制度为单位)。

BuildingAddress

公共 API:Resources.buildings

JSON 表示法
{
  "regionCode": string,
  "languageCode": string,
  "postalCode": string,
  "administrativeArea": string,
  "locality": string,
  "sublocality": string,
  "addressLines": [
    string
  ]
}
字段
regionCode

string

必需。地址所在国家/地区的 CLDR 地区代码。

languageCode

string

可选。此地址内容的 BCP-47 语言代码(如果已知)。

postalCode

string

可选。地址的邮政编码。

administrativeArea

string

可选。某个国家或地区的邮政地址使用的最高行政区划。

locality

string

可选。一般是指地址的城市/城镇部分。示例:美国的城市、意大利的市镇、英国的邮镇。对于没有明确定义 locality 或者其无法很好地对应这个结构的区域,应将 locality 留空并使用 address_lines。

sublocality

string

可选。地址的副市级行政区。

addressLines[]

string

描述详细地址的非结构化地址行。

方法

delete

删除建筑物。

get

用于检索建筑物。

insert

插入建筑物。

list

检索某个帐号的建筑物列表。

patch

修补建筑物。

update

更新建筑物。