(未显示1个用户的2个中间版本) | |||
第1行: | 第1行: | ||
{{car-sidebar}} | {{car-sidebar}} | ||
− | ==接口说明== | + | |
+ | == 接口说明 == | ||
+ | |||
+ | <span style="color:red;"> 车联网API服务的各种能力后续将合并到Web API服务中。自2015年12月31日起,车联网API服务将不再向新用户提供服务支持。已有用户服务暂不受影响,请已使用了各种车联网API服务的开发者,尽快升级服务到Web API中使用。</span> | ||
根据城市名称、城市代码、经纬度坐标查询当前城市热映影片。 | 根据城市名称、城市代码、经纬度坐标查询当前城市热映影片。 | ||
− | ==接口示例== | + | == 接口示例 == |
− | http://api.map.baidu.com/telematics/v3/movie?qt=hot_movie&location=北京&ak= | + | [http://api.map.baidu.com/telematics/v3/movie?qt=hot_movie&location=北京&ak=E4805d16520de693a3fe707cdc962045 http://api.map.baidu.com/telematics/v3/movie?qt=hot_movie&location=北京&ak=E4805d16520de693a3fe707cdc962045] |
− | ==接口参数说明== | + | == 接口参数说明 == |
{| | {| | ||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | ! width="100" | 参数类型 |
− | | | + | ! width="100" | 参数名称 |
− | | | + | ! width="100" | 是否必须 |
− | + | ! 具体描述 | |
|- | |- | ||
− | |String | + | | String |
− | | | + | | ak |
− | | | + | | true |
− | | | + | | 开发者密钥 |
|- | |- | ||
− | |String | + | | String |
− | | | + | | sn |
− | | | + | | false |
− | | | + | | 若用户所用ak的校验方式为sn校验时该参数必须。 |
|- | |- | ||
− | |String | + | | String |
− | | | + | | location |
− | | | + | | true |
− | | | + | | 输入城市名或经纬度,城市名称如:北京或者131,经纬度格式为lng,lat坐标如: location=116.305145,39.982368。 |
|- | |- | ||
− | |String | + | | String |
− | | | + | | output |
− | |false | + | | false |
− | | | + | | 输出的数据格式,默认为xml格式,当output设置为’json’时,输出的为json格式的数据。 |
|- | |- | ||
− | |String | + | | String |
− | | | + | | coord_type |
− | |false | + | | false |
− | | | + | | 请求参数坐标类型,默认为gcj02经纬度坐标。允许的值为bd09ll、bd09mc、gcj02、wgs84。bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托坐标,gcj02表示经过国测局加密的坐标。wgs84表示gps获取的坐标。 |
|- | |- | ||
− | |String | + | | String |
− | |callback | + | | out_coord_type |
− | |false | + | | false |
− | |将json格式的返回值通过callback函数返回以实现jsonp功能。举例:callback=showLocation(JavaScript函数名)。 | + | | 返回结果输出时的坐标类型,默认为gcj02经纬度坐标。允许的值为bd09ll、bd09mc、gcj02。bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托坐标,gcj02表示经过国测局加密的坐标。 |
+ | |- | ||
+ | | String | ||
+ | | callback | ||
+ | | false | ||
+ | | 将json格式的返回值通过callback函数返回以实现jsonp功能。举例:callback=showLocation(JavaScript函数名)。 | ||
|} | |} | ||
− | ==返回结果== | + | == 返回结果 == |
{| | {| | ||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | ! width="200" | 参数名称 |
− | | | + | ! width="200" | 含义 |
− | + | ! 说明 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | | + | | status |
− | | | + | | 返回结果状态信息 |
− | | | + | | 请求状态,如果成功返回0,如果失败返回其他数字,详细见状态码附录。 |
|- | |- | ||
− | | | + | | results |
− | | | + | | 返回结果 |
− | | | + | | |
|- | |- | ||
− | |result. | + | | result.cityname |
− | | | + | | 城市名称 |
− | | | + | | 如 北京 |
|- | |- | ||
− | |result. | + | | result.cityid |
− | | | + | | 城市代码 |
− | | | + | | 如 131 |
|- | |- | ||
− | |result. | + | | result.location |
− | | | + | | 当前城市坐标(经纬度) |
− | | | + | | |
|- | |- | ||
− | |result. | + | | result.location.lng |
− | | | + | | 经度 |
− | | | + | | |
|- | |- | ||
− | |result. | + | | result.location.lat |
− | | | + | | 纬度 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item | + | | result.movie.item |
− | | | + | | 每项电影信息 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_id |
− | | | + | | 影片id |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_name |
− | | | + | | 影片名称 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_type |
− | | | + | | 影片类型 |
− | | | + | | 如 3D |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_release_date |
− | | | + | | 影片上映时间 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_nation |
− | | | + | | 影片所属国家 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_starring |
− | | | + | | 影片演员 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_length |
− | | | + | | 影片时长 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_picture |
− | | | + | | 影片图片地址 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_score |
− | | | + | | 影片评分 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_director |
− | | | + | | 影片导演 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item. | + | | result.movie.item.movie_tags |
− | | | + | | 影片所属类型 |
− | | | + | | |
|- | |- | ||
− | |result.movie.item.movies_wd | + | | result.movie.item.movie_message |
− | |影片关键字 | + | | 影片概要信息 |
− | | | + | | |
+ | |- | ||
+ | | result.movie.item.is_imax | ||
+ | | 是否imax类型 | ||
+ | | | ||
+ | |- | ||
+ | | result.movie.item.is_new | ||
+ | | 是否首次上映 | ||
+ | | | ||
+ | |- | ||
+ | | result.movie.item.movies_wd | ||
+ | | 影片关键字 | ||
+ | | | ||
|} | |} | ||
− | ==返回xml格式的数据== | + | == 返回xml格式的数据 == |
− | + | <pre><?xml version="1.0" encoding="utf-8"?> | |
− | <pre> | + | |
− | <?xml version="1.0" encoding="utf-8"?> | + | |
<telematics> | <telematics> | ||
<error>0</error> | <error>0</error> | ||
第190行: | 第193行: | ||
</pre> | </pre> | ||
− | ==返回json格式的数据== | + | == 返回json格式的数据 == |
− | + | <pre>{ | |
− | <pre> | + | |
− | { | + | |
"error": 0, | "error": 0, | ||
"status": "Success", | "status": "Success", |
2022年11月14日 (一) 11:14的最后版本
接口说明
车联网API服务的各种能力后续将合并到Web API服务中。自2015年12月31日起,车联网API服务将不再向新用户提供服务支持。已有用户服务暂不受影响,请已使用了各种车联网API服务的开发者,尽快升级服务到Web API中使用。
根据城市名称、城市代码、经纬度坐标查询当前城市热映影片。
接口示例
http://api.map.baidu.com/telematics/v3/movie?qt=hot_movie&location=北京&ak=E4805d16520de693a3fe707cdc962045
接口参数说明
参数类型 | 参数名称 | 是否必须 | 具体描述 |
---|---|---|---|
String | ak | true | 开发者密钥 |
String | sn | false | 若用户所用ak的校验方式为sn校验时该参数必须。 |
String | location | true | 输入城市名或经纬度,城市名称如:北京或者131,经纬度格式为lng,lat坐标如: location=116.305145,39.982368。 |
String | output | false | 输出的数据格式,默认为xml格式,当output设置为’json’时,输出的为json格式的数据。 |
String | coord_type | false | 请求参数坐标类型,默认为gcj02经纬度坐标。允许的值为bd09ll、bd09mc、gcj02、wgs84。bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托坐标,gcj02表示经过国测局加密的坐标。wgs84表示gps获取的坐标。 |
String | out_coord_type | false | 返回结果输出时的坐标类型,默认为gcj02经纬度坐标。允许的值为bd09ll、bd09mc、gcj02。bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托坐标,gcj02表示经过国测局加密的坐标。 |
String | callback | false | 将json格式的返回值通过callback函数返回以实现jsonp功能。举例:callback=showLocation(JavaScript函数名)。 |
返回结果
参数名称 | 含义 | 说明 |
---|---|---|
status | 返回结果状态信息 | 请求状态,如果成功返回0,如果失败返回其他数字,详细见状态码附录。 |
results | 返回结果 | |
result.cityname | 城市名称 | 如 北京 |
result.cityid | 城市代码 | 如 131 |
result.location | 当前城市坐标(经纬度) | |
result.location.lng | 经度 | |
result.location.lat | 纬度 | |
result.movie.item | 每项电影信息 | |
result.movie.item.movie_id | 影片id | |
result.movie.item.movie_name | 影片名称 | |
result.movie.item.movie_type | 影片类型 | 如 3D |
result.movie.item.movie_release_date | 影片上映时间 | |
result.movie.item.movie_nation | 影片所属国家 | |
result.movie.item.movie_starring | 影片演员 | |
result.movie.item.movie_length | 影片时长 | |
result.movie.item.movie_picture | 影片图片地址 | |
result.movie.item.movie_score | 影片评分 | |
result.movie.item.movie_director | 影片导演 | |
result.movie.item.movie_tags | 影片所属类型 | |
result.movie.item.movie_message | 影片概要信息 | |
result.movie.item.is_imax | 是否imax类型 | |
result.movie.item.is_new | 是否首次上映 | |
result.movie.item.movies_wd | 影片关键字 |
返回xml格式的数据
<?xml version="1.0" encoding="utf-8"?> <telematics> <error>0</error> <status>Success</status> <date>2014-02-13</date> <result> <cityid>131</cityid> <cityname>北京市</cityname> <location> <lng>116.3975010526</lng> <lat>39.908546091554</lat> </location> <movie> <item> <movie_id>02e52a4c6f9d950c7e1329d1a5cf7009</movie_id> <movie_name>冰雪奇缘</movie_name> <movie_type>3D</movie_type> <movie_release_date>2014-02-05</movie_release_date> <movie_nation>中国大陆,美国</movie_nation> <movie_starring>克里斯汀•贝尔/伊迪娜•门泽尔/乔纳森•格罗夫/乔什•盖德/桑蒂诺•丰塔纳/桑蒂诺•丰塔纳/塞伦•希德/克里斯•威廉姆斯/斯蒂芬•安德森/伊迪•迈克莱尔/罗伯特•派恩/莫里斯•拉马奇</movie_starring> <movie_length>108分钟</movie_length> <movie_picture>http://Img.wangpiao.com/NewsImage/20141/4cbaee07-078a-407d-a31c-6c5fa4cb4c3b.jpg</movie_picture> <movie_score>9.4</movie_score> <movie_director>克里斯•巴克</movie_director> <movie_tags>冒险,动画,喜剧</movie_tags> <movie_message>讲述了一个破解冰封魔咒的故事,获得过多项国际大奖</movie_message> <is_imax>0</is_imax> <is_new>0</is_new> <movies_wd>冰雪奇缘热门电影</movies_wd> </item> </movie> </result> </telematics>
返回json格式的数据
{ "error": 0, "status": "Success", "date": "2014-02-13", "result": { "cityid": 131, "cityname": "北京市", "location": { "lng": 116.3975010526, "lat": 39.908546091554 }, "movie": [ { "movie_id": "02e52a4c6f9d950c7e1329d1a5cf7009", "movie_name": "冰雪奇缘", "movie_type": "3D", "movie_release_date": "2014-02-05", "movie_nation": "中国大陆,美国", "movie_starring": "克里斯汀•贝尔/伊迪娜•门泽尔/乔纳森•格罗夫/乔什•盖德/桑蒂诺•丰塔纳/桑蒂诺•丰塔纳/塞伦•希德/克里斯•威廉姆斯/斯蒂芬•安德森/伊迪•迈克莱尔/罗伯特•派恩/莫里斯•拉马奇", "movie_length": "108分钟", "movie_picture": "http://Img.wangpiao.com/NewsImage/20141/4cbaee07-078a-407d-a31c-6c5fa4cb4c3b.jpg", "movie_score": "9.4", "movie_director": "克里斯•巴克", "movie_tags": "冒险,动画,喜剧", "movie_message": "讲述了一个破解冰封魔咒的故事,获得过多项国际大奖", "is_imax": 0, "is_new": "0", "movies_wd": "冰雪奇缘热门电影" }, ] }