$Id: ghgml.zh.xml 384 2016-03-24 11:49:20Z afue $
版权 © 2006 - 2016 GIATA GmbH 公司
摘要
网络服务以 REST(REpresentational State Transfer)应用方式提供。
此项网络服务及所属文档将继续扩充。
此项网络服务使用密码保护。
密码保护使用 HTTP 基本认证登录验证。
登录验证时使用的用户名是由用户名(按照惯例是电邮地址 "@ "之前的部分)+ | (竖线) + 公司名称。
测试访问请使用下方组合:
测试用户名|测试公司
测试密码
http://ghgml.giatamedia.com/webservice/rest/1.0/items/
可使用下列修饰词,可当作查询字符串缀在上述 URI 之后:
依照 ISO 3166-1 国际标准以二位字母代码来代替国家名称
仅响应在输入日期(格式:年年年年-月月-日日)之后有过更动的住宿设施
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/items/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/items/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/items/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xlink="http://www.w3.org/1999/xlink">
<items changedSince="2006-09-01" country="ES">
<item giataId="2272" lastUpdate="2006-09-04T17:13:46+02:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/items/2272" />
<item giataId="2275" lastUpdate="2006-09-04T17:13:46+02:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/items/2275" />
<!-- ... -->
</items>
</result>根据使用的修饰词,在 <result> 中的节点 <items> 可包含下列属性:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
住宿设施最后一次更动是在输入日期(格式:年年年年-月月-日日)之后
每个在 <result><items> 中的节点 <item> 包含下列属性:
GIATA ID(酒店代号)
此项住宿设施的最后更动日期是依据 ISO 8601 国际标准
此项住宿设施个别描述的 URI
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/*语言*/
使用 ISO 639-1 国际标准之二位字母代码
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/zh-cmn-Hans/
可使用下列修饰词,可当作查询字符串缀在上述 URI 之后:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
仅响应在输入日期(格式:年年年年-月月-日日)之后有过更动的住宿设施
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xlink="http://www.w3.org/1999/xlink">
<items lang="en" changedSince="2006-09-01" country="ES">
<item giataId="2687" lastUpdate="2006-09-04T17:13:46+02:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/2687" />
<item giataId="3159" lastUpdate="2006-09-04T17:13:21+02:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/3159" />
<!-- ... -->
</items>
</result>在 <result> 中的节点 <items> 包含下列属性:
使用 ISO 639-1 国际标准以二位字母代码来代替语言
根据使用的修饰词,在 <result> 中的节点 <items> 可包含下列属性:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
住宿设施最后一次更动是在输入日期(格式:年年年年-月月-日日)之后
每个在 <result><items> 中的节点 <item> 包含下列属性:
GIATA ID(酒店代号)
此项住宿设施所选语言的文字描述最后更动日期是依据 ISO 8601 国际标准
此项住宿设施所选语言文字描述的 URI
http://ghgml.giatamedia.com/webservice/rest/1.0/images/
可使用下列修饰词,可当作查询字符串缀在上述 URI 之后:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
仅响应在输入日期(格式:年年年年-月月-日日)之后有过更动的住宿设施
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/images/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/images/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/images/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xlink="http://www.w3.org/1999/xlink">
<items changedSince="2006-09-01" country="ES">
<item giataId="2275" lastUpdate="2006-08-18T17:06:38+02:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275" />
<item giataId="2284" lastUpdate="2006-08-18T17:06:38+02:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2284" />
<!-- ... -->
</items>
</result>根据使用的修饰词,在 <result> 中的节点 <items> 可包含下列属性:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
住宿设施最后一次更动是在输入日期(格式:年年年年-月月-日日)之后
每个在 <result><items> 中的节点 <item> 包含下列属性:
GIATA ID(酒店代号)
此项住宿设施图片最后更动日期是依据 ISO 8601 国际标准
此项住宿设施图片清单之 URI
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/
可使用下列修饰词,可当作查询字符串缀在上述 URI 之后:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
仅响应在输入日期(格式:年年年年-月月-日日)之后有过更动的住宿设施
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/?country=ES
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/?changedSince=2006-09-01
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/?country=ES&changedSince=2006-09-01
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xlink="http://www.w3.org/1999/xlink">
<items changedSince="2006-09-01" country="ES">
<item giataId="2275" lastUpdate="2006-12-30T11:41:34+01:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/2275" />
<item giataId="2284" lastUpdate="2006-12-30T11:41:34+01:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/2284" />
<!-- ... -->
</items>
</result>根据使用的修饰词,在 <result> 中的节点 <items> 可包含下列属性:
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
住宿设施最后一次更动是在输入日期(格式:年年年年-月月-日日)之后
每个在 <result><items> 中的节点 <item> 包含下列属性:
GIATA ID(酒店代号)
此项住宿设施的酒店介绍(fact)最后更动日期是依据 ISO 8601 国际标准
此项住宿设施酒店介绍列表(fact sheets)之 URI
如要在一个有多个住宿设施的清单中检索详细信息(名称、地址、文字叙述、图片),必须得知这些住宿设施的 GIATA ID(酒店代号)。
在此情形下,则不可用修饰词(如 country 或是 changedSince)。
GIATA ID(酒店代号)需利用一个 HTTP POST 请求发送。
响应的详细信息是根据请求发送对象的 URI 而定。
http://ghgml.giatamedia.com/webservice/rest/1.0/items
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/*语言代码*
(第 2.1.2 节 “所有住宿设施清单, 包含一种语言的文字描述”)
例如:http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en
http://ghgml.giatamedia.com/webservice/rest/1.0/images
http://ghgml.giatamedia.com/webservice/rest/1.0/items/*语言代码*
例如:http://ghgml.giatamedia.com/webservice/rest/1.0/items/en
可用两种方式来发送 HTTP POST 请求:
URL 编码 HTTP POST 方式,此方式是数个 GIATA ID(酒店代号)以数组变量giataIds来提交。
例如:
curl -s --basic -u "*用户名*|*公司*:*密码*"
-d "giataIds[]=2275&giataIds[]=2272"
"*URL*"HTTP POST 方式,此方式是将请求封装于一个 XML 文件中。
XML 文件例子:
<?xml version="1.0" encoding="UTF-8"?>
<giataIds>
<giataId>2275</giataId>
<giataId>2272</giataId>
</giataIds>请求范例:
curl -s --basic -u "*用户名*|*公司*:*密码*"
-d "<?xml version=\"1.0\" encoding=\"UTF-8\"?><giataIds><giataId>2275</giataId><giataId>2272</giataId></giataIds>"
"*网址*"例如:
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/listOfItems.xsd">
<items>
<item giataId="2275">
<!--
BEGIN name, city, country
http://ghgml.giatamedia.com/webservice/rest/1.0/items/
http://ghgml.giatamedia.com/webservice/rest/1.0/items/en
-->
<name>Melia Alicante</name>
<city>San Juan</city>
<country>ES</country>
<!--
END name, city, country
-->
<!--
BEGIN texts
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en
http://ghgml.giatamedia.com/webservice/rest/1.0/items/en
-->
<texts>
<text lastUpdate="2007-04-05T00:10:08+02:00"
lang="en">
<sections>
<section type="100">
<title>Location</title>
<para>
This attractive beach hotel can be found
just 100 metres from the centre of San
Juans...
</para>
</section>
<section type="101">
<title>Facilities</title>
<para>
Built in 1973, the hotel offers a total
of 1150 rooms, of which 5 are suites 54
are singles and 486 are doubles...
</para>
</section>
<!-- ... -->
</sections>
</text>
</texts>
<!--
END texts
-->
<!--
BEGIN images
http://ghgml.giatamedia.com/webservice/rest/1.0/images
http://ghgml.giatamedia.com/webservice/rest/1.0/items
http://ghgml.giatamedia.com/webservice/rest/1.0/items/en
-->
<images>
<image type="a"
lastUpdate="2007-06-05T01:56:10+02:00">
<sizes>
<size maxwidth="74" width="74" height="59"
filesize="4729"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14662" />
<size maxwidth="320" width="320" height="256"
filesize="33044"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14663" />
<size maxwidth="800" width="749" height="600"
filesize="110853"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14664" />
</sizes>
</image>
<!-- ... -->
</images>
<!--
END images
-->
</item>
<item giataId="2272">
<!-- ... -->
</item>
<!-- ... -->
</items>
</result>XML 架构:
http://ghgml.giatamedia.com/xsd/1.0/listOfItems.xsd
在 <result> 中的节点 <items> 包含一个或数个节点 <item>。
分段的说明请参照各个住宿设施相关资源的描述:
http://ghgml.giatamedia.com/webservice/rest/1.0/items/*GIATA ID(酒店代号) *
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/items/2275
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/item.xsd">
<item giataId="2275">
<name>Melia Alicante</name>
<street/>
<city>San Juan</city>
<country>ES</country>
<factsheet lastUpdate="2006-12-30T11:41:34+01:00"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/2275" />
<texts>
<text lastUpdate="2005-10-06T11:55:33+02:00" lang="de"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/de/2275" />
<text lastUpdate="2005-12-16T20:40:16+01:00" lang="en"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/texts/en/2275" />
<!-- ... -->
</texts>
<images>
<image type="a" lastUpdate="2006-08-18T17:06:38+02:00">
<sizes>
<size maxwidth="74" width="74" height="59" filesize="4729"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14662" />
<size maxwidth="320" width="320" height="256" filesize="33044"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14663" />
<size maxwidth="800" width="749" height="600" filesize="110853"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14664" />
</sizes>
</image>
<image type="l" lastUpdate="2006-08-18T17:06:38+02:00">
<sizes>
<size maxwidth="74" width="74" height="42" filesize="3617"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14665" />
<!-- ... -->
</sizes>
</image>
<!-- ... -->
</images>
</item>
</result>XML 架构:
http://ghgml.giatamedia.com/xsd/1.0/item.xsd
节点 <result><item> 包含下列节点:
住宿设施名称
空白
城市
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
属性xlink:href包含此项住宿设施酒店介绍列表(fact sheets)的 URI。
包含数个 <text> 类型的节点,每个节点带有语言属性lang及相对应语言文字描述的 URI 的属性xlink:href 。
包含数个节点 <image>,每个节点带有图片主题属性type及最后一次更动时间点的属性lastUpdate。
每个 <image><sizes> 类型的节点包含数个 <size> 类型的节点;节点包含图像尺寸的最大宽度(目前是74, 320, 800)、 宽度,及 高,还有图像文件的 URI 的属性 xlink:href。
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/*语言*/*GIATA ID(酒店代号)*
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/texts/zh/2275
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/itemText.xsd">
<item giataId="2275">
<texts>
<text lastUpdate="2016-02-24T21:15:06+01:00" lang="zh">
<sections>
<section type="101">
<title>酒店设施</title>
<para>
共有544间客房。乘坐电梯即可轻松抵达酒店较高楼层。
酒店设施包括衣帽寄存、保险柜和货币兑换服务。
公共区域设有互联网接口(需付费)以及无线网络供客人使用。
在餐饮设施方面提供餐厅、用餐区、早餐厅、咖啡厅和酒吧。
孩子们可在游乐场尽情嬉戏玩耍。其他设施还包括电视厅和游戏房。
如有需要,客人可使用酒店的停车场(需付费)。
尚有其他服务,例如儿童看护、翻译、送餐服务、洗衣服务和美发沙龙。
商务区有会议室和商务中心。
</para>
</section>
<section type="102">
<title>客房设施</title>
<para>
酒店提供家庭房、无烟房和吸烟房。
所有房间备有空调、中央供暖和浴室。
阳台或露台是大多数房间的设施之一。
美丽海景为住宿增添了迷人氛围。
房内配有双人床。
房内设施还包含保险柜和迷你吧。
客房的便利设备包括冰箱、迷你冰箱和煮茶/咖啡机。
互联网接口、电话和电视机也包含在基本设施里。
浴室里有淋浴间、浴缸和吹风机。
</para>
</section>
<!-- ... -->
</sections>
</text>
</texts>
</item>
</result>XML 架构:
http://ghgml.giatamedia.com/xsd/1.0/itemText.xsd
节点 <result><item><texts><text><section> 包含数个 <section> 类型的节点:
每个<section> 类型的节点代表一条信息以及分别包含两个节点:
标题
此段落的正文文本
属性值type代表信息种类,并可用来确定定制标题的使用。
http://ghgml.giatamedia.com/webservice/rest/1.0/images/*GIATA ID(酒店代号)*
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/itemImage.xsd">
<item giataId="2275">
<images>
<image type="a" lastUpdate="2006-08-18T17:06:38+02:00">
<sizes>
<size maxwidth="74" width="74" height="59" filesize="4729"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14662" />
<size maxwidth="320" width="320" height="256" filesize="33044"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14663" />
<size maxwidth="800" width="749" height="600" filesize="110853"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/images/2275/14664" />
</sizes>
</image>
<!-- ... -->
</images>
</item>
</result>XML 架构:
http://ghgml.giatamedia.com/xsd/1.0/itemImage.xsd
节点 <result><item><images> 包含数个 <image> 类型的节点:
每个 <image> 的节点包含图片主题属性type及最后一次更动时间点的属性lastUpdate。
每个 <image> 类型的节点数个 <sizes><size> 类型的节点,每个节点包含图像最大宽度属性 maxwidth(目前是 74, 320, 800)、图像尺寸属性width及height,还有图像文件的 URI 的属性xlink:href。
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/*GIATA ID(酒店代号)*
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheets/3183
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/itemFactSheet.xsd">
<item giataId="2817">
<name>Orquidea Bahia Feliz</name>
<street/>
<city>Bahia Feliz</city>
<country>ES</country>
<factsheet lastUpdate="2006-12-30T11:41:34+01:00">
<sections>
<section type="1001" name="object_information">
<facts>
<fact id="3" name="hotel_chain"
typeHint="string">
<value>HOTET</value>
</fact>
<fact id="6" name="postcode"
typeHint="string">
<value>35107</value>
</fact>
<fact id="8" name="phone_reservation"
typeHint="string">
<value>928157240</value>
</fact>
<!-- ... -->
</facts>
</section>
<!-- ... -->
<section type="1006" name="beach">
<facts>
<fact id="59" name="beach_sandy"
typeHint="bool">
<value>true</value>
</fact>
<fact id="62" name="beach_sunloungers"
typeHint="bool">
<value fee="true">true</value>
</fact>
<!-- ... -->
</facts>
</section>
<!-- ... -->
<section type="1011" name="distances">
<facts>
<fact id="1001" name="dist_city_centre"
typeHint="int">
<value name="distance" unit="m">700</value>
</fact>
<fact id="1002" name="dist_tourist_centre"
typeHint="int">
<value name="distance" unit="m">4000</value>
</fact>
<!-- ... -->
</facts>
</section>
</sections>
</factsheet>
</item>
</result>XML 架构:
http://ghgml.giatamedia.com/xsd/1.0/itemFactSheet.xsd
节点 <result><item> 包含下列节点:
住宿设施名称
空白
城市
依据 ISO 3166-1 国际标准以二位字母代码来代替国家名称
住宿设施之酒店介绍列表(fact sheet),包含最后一次更动时间点的属性 lastUpdate
包含一个 <sections> 类型的节点,此节点包含数个 <section> 类型的节点。
每个 <section> 类型的节点描述一个酒店介绍(facts)群组并包含下列属性:
可用来识别酒店介绍(facts)群组的不变整数值,请参阅酒店介绍列表(fact sheet)定义
酒店介绍(facts)群组的名称,请参阅酒店介绍列表(fact sheet)定义
每个 <section> 类型的节点包含一个 <facts> 类型的节点,此节点包含数个 <fact> 类型的节点
每个 <fact> 类型的节点描述一项酒店介绍(facts)并包含下列属性:
可用来识别酒店介绍(facts)的不变整数值,请参阅酒店介绍列表(fact sheet)定义
酒店介绍(facts)的名称,请参阅酒店介绍列表(fact sheet)定义
输入酒店介绍(facts)值类型
可能的值为:
bool: 布尔值
int: 整数
float: 浮点数
string: 字符串
每个 <fact> 类型的节点包含一个或数个 <value> 类型的节点,节点包含酒店介绍(facts)值:
下列为可能的属性:
如在某一项酒店介绍(facts)中描述某项服务,请输入是否需收取费用
标记该值为测试值,此值不同于实际值
如一项酒店介绍(facts)具备数个值,则可用于辨识个别的值。
表示酒店介绍(facts)值的单位,如果不能从该值中得知。
可能的值为:
m: 米
min: 分钟
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xlink="http://www.w3.org/1999/xlink">
<languages>
<!-- ... -->
<factdefinitions lang="de"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/de" />
<factdefinitions lang="en"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/en" />
<factdefinitions lang="en-US"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/en-US" />
<factdefinitions lang="es"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/es" />
<factdefinitions lang="es-419"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/es-419" />
<!-- ... -->
<factdefinitions lang="zh-cmn-Hans"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/zh-cmn-Hans" />
<!-- ... -->
</languages>
</result>节点 <result><languages> 包含数个 <factdefinitions> 类型的节点,节点包含下列属性:
依据国际标准 ISO 639, 如为某一种语言区域分支(locale),则依据 RFC 4646 标准
此种语言的酒店介绍列表(fact sheet)定义翻译的 URI
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/*语言*/
依据国际标准 ISO 639, 如为某一种语言区域分支(locale),则依据 RFC 4646 标准
简体中文范例:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/zh-cmn-Hans
<?xml version="1.0" encoding="UTF-8"?>
<result>
<factdefinitions lang="de">
<sections>
<section type="1001" name="object_information">
<title>目标信息</title>
<facts>
<fact id="3" name="hotel_chain" typeHint="string">
<title>连锁酒店</title>
</fact>
<fact id="6" name="postcode" typeHint="string">
<title>邮政编码</title>
</fact>
<fact id="8" name="phone_reservation"
typeHint="string">
<title>预订电话</title>
</fact>
<!-- ... -->
</facts>
</section>
<!-- ... -->
<section type="1006" name="beach">
<title>海滩</title>
<facts>
<fact id="59" name="beach_sandy" typeHint="bool">
<title>沙滩</title>
</fact>
<!-- ... -->
<fact id="62" name="beach_sunloungers"
typeHint="bool">
<title>日光浴躺椅</title>
</fact>
<!-- ... -->
</facts>
</section>
<!-- ... -->
<section type="1011" name="distances">
<title>距离</title>
<facts>
<fact id="1001" name="dist_city_centre" typeHint="int">
<title>市中心</title>
</fact>
<fact id="1002" name="dist_tourist_centre" typeHint="int">
<title>游客中心</title>
</fact>
<!-- ... -->
</facts>
</section>
</sections>
</factdefinitions>
</result>英语范例:
http://ghgml.giatamedia.com/webservice/rest/1.0/factsheetdefinitions/en
<?xml version="1.0" encoding="UTF-8"?>
<result>
<factdefinitions lang="en">
<sections>
<section type="1001" name="object_information">
<title>Object Information</title>
<facts>
<fact id="3" name="hotel_chain" typeHint="string">
<title>Hotel Chain</title>
</fact>
<fact id="6" name="postcode" typeHint="string">
<title>Postcode</title>
</fact>
<fact id="8" name="phone_reservation"
typeHint="string">
<title>Telephone Reservation</title>
</fact>
<!-- ... -->
</facts>
</section>
<!-- ... -->
<section type="1006" name="beach">
<title>Beach</title>
<facts>
<fact id="59" name="beach_sandy" typeHint="bool">
<title>Sandy Beach</title>
</fact>
<!-- ... -->
<fact id="62" name="beach_sunloungers"
typeHint="bool">
<title>Sun loungers</title>
</fact>
<!-- ... -->
</facts>
</section>
<!-- ... -->
<section type="1011" name="distances">
<title>Distances</title>
<facts>
<fact id="1001" name="dist_city_centre" typeHint="int">
<title>City Centre</title>
</fact>
<fact id="1002" name="dist_tourist_centre" typeHint="int">
<title>Tourist Centre</title>
</fact>
<!-- ... -->
</facts>
</section>
</sections>
</factdefinitions>
</result>节点 <result><factsheetdefinitions> 具备所选语言的属性lang并包含一个 <sections> 类型的节点,节点包含数个 <section> 类型的节点。
每个 <section> 类型的节点描述一个酒店介绍(facts)群组并包含下列属性:
识别酒店介绍(facts)群组的不变整数值
一项酒店介绍(facts)群组的名称
每个 <section> 类型的节点包含一个 <title> 类型的节点,节点包含以所选择语言的酒店介绍(facts)定义翻译为值。
每个 <section> 类型的节点包含一个 <facts> 类型的节点,节点包含数个 <fact> 类型的节点。
每个 <fact> 类型的节点描述一项酒店介绍并包含下列属性:
识别酒店介绍(facts)的不变整数值
一项酒店介绍(facts)的名称
输入酒店介绍(facts)值类型
可能的值为:
bool: 布尔值
int: 整数
float: 浮点数
string: 字符串
每个 <fact> 类型的节点包含一个 <title> 类型的节点,节点包含酒店介绍(facts)名称的翻译。
激活此部分需签订额外合同,相关事宜请您电邮联系:<service@giata.de>。
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xlink="http://www.w3.org/1999/xlink">
<mappings>
<mapping supplier="hotelbeds"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/hotelbeds" />
<mapping supplier="tourico"
xlink:href="http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/tourico" />
<!-- ... -->
</mappings>
</result>节点 <result><mappings> 包含数个 <mapping> 类型的节点,节点包含下列属性:
供应商名称 ,在 MHG(Multilingual Hotel Guide)其住宿设施代码被映射为 GIATA ID(酒店代号)。
从供应商住宿设施代码映射的 GIATA ID(酒店代号)的 URI。
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/*供应商名称*
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/tourico
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mapping.xsd">
<items supplier="tourico">
<!-- ... -->
<item giataId="1399">
<code>
<value>1038976</value>
</code>
</item>
<item giataId="1410">
<code>
<value>13806</value>
</code>
</item>
<item giataId="1411">
<code>
<value>1035278</value>
</code>
<code>
<value>13797</value>
</code>
</item>
<!-- ... -->
</items>
</result>XML 架构:
http://ghgml.giatamedia.com/xsd/1.0/mapping.xsd
节点 <result><items> 带有属性supplier,包含供应商名称,并包含数个 <item> 类型节点。
每个 <item> 类型的节点带有 GIATA ID(酒店代号)的属性giataId,并包含一个或数个 <code> 类型的节点。
每个 <code> 类型的节点包含一个或数个 <value> 类型的节点。如该住宿设施的供应商代码被拆分,例如在连锁酒店及酒店代码,<value> 会多次出现。
每个 <value> 类型的节点可包含属性name,例如连锁酒店或是酒店代号。
您可利用供应商名称及住宿设施的代码来检索该项住宿设施的映射。将会返回不同供应商(第 2.3.2.1 节 “供应商清单”)所有已知的代码。
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/*供应商名称*/*住宿设施代码*
例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/tourico/1038976
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd">
<items supplier="tourico" id="1038976">
<item giataId="1399">
<name>Holiday Inn Golden Mile</name>
<city>Kowloon - Hongkong</city>
<country>CN</country>
<code supplier="hotelbeds">
<value>69601</value>
</code>
<code supplier="tourico">
<value>1038976</value>
</code>
<code supplier="pegs">
<value name="Chain Code">HI</value>
<value name="Property Code">HKGKL</value>
</code>
</item>
</items>
</result>对应的 XML架构请您参考:
http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd
节点 <result><items> 带有属性supplier,包含供应商名称,以及属性id,包含该供应商住宿设施代码; 此节点包含一个或数个 <item> 类型的节点。
每个 <item> 类型的节点带有 GIATA ID(酒店代号)的属性giataId,可包含用来辨识住宿设施的节点 <name>、 <city>、 <street> 及 <country>。
每个 <item> 类型节点包含除此之外一个或数个 <code> 类型节点。
每个 <code> 类型的节点包含一个或数个 <value> 类型的节点。如该住宿设施的供应商代码被拆分,例如在连锁酒店及酒店代码,<value> 会多次出现。
每个 <value> 类型的节点可包含属性name,例如连锁酒店或是酒店代号。
也可借助 GIATA ID(酒店代号) 来进行映射,如下:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/giata/1399
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd">
<items supplier="giata" id="1399">
<item giataId="1399">
<name>Holiday Inn Golden Mile</name>
<city>Kowloon - Hongkong</city>
<country>CN</country>
<code supplier="hotelbeds">
<value>69601</value>
</code>
<code supplier="tourico">
<value>1038976</value>
</code>
<code supplier="pegs">
<value name="Chain Code">HI</value>
<value name="Property Code">HKGKL</value>
</code>
</item>
</items>
</result>在一些情况下,提交的请求得不到结果。
这可能是需要一个组合而成的代码。
在这种情况,请您将组成部分(例如:连锁酒店及酒店代码,或是国家代码、目的地代码及酒店代码)去掉分隔符组合成一组字符串。例如:
http://ghgml.giatamedia.com/webservice/rest/1.0/mappings/pegs/HIHKGKL
<?xml version="1.0" encoding="UTF-8"?>
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ghgml.giatamedia.com/xsd/1.0/mappings.xsd">
<items supplier="pegs" id="HIHKGKL">
<item giataId="1399">
<name>Holiday Inn Golden Mile</name>
<city>Kowloon - Hongkong</city>
<country>CN</country>
<code supplier="hotelbeds">
<value>69601</value>
</code>
<code supplier="tourico">
<value>1038976</value>
</code>
<code supplier="pegs">
<value name="Chain Code">HI</value>
<value name="Property Code">HKGKL</value>
</code>
</item>
</items>
</result>