自动站数据接口

From Caiyun Wiki
Revision as of 03:30, 28 October 2020 by Ringsaturn (talk | contribs)
Jump to: navigation, search

授权与认证

请先至彩云开放平台注册,注册后可以获得 token 。

使用本接口,开发者token需要额外开通权限,请联系商务:api@caiyunapp.com

把您的 token 拼到 API 请求的 URL 中,如: http://api.caiyunapp.com/v1/surf/nearest/?token=TAkhjf8d1nlSlspN&lng=110.8840&lat=21.6594

其中 TAkhjf8d1nlSlspN 就是一个共用测试 token 。不要把私有token 告诉任何人!

请求样例

http://api.caiyunapp.com/v1/surf/nearest/?token=TAkhjf8d1nlSlspN&lng=110.8840&lat=21.6594

返回结构和说明

 1 {
 2   "status":"ok",
 3   "result":[
 4     {
 5       "Station_Id_d":733855,
 6       "location":{
 7         "type":"Point",
 8         "coordinates":[
 9           117.980599999999996,
10           32.0886
11         ]
12       },
13       "PRE_1h":"0",
14       "TEM":"17.9",
15       "VIS":null
16     },
17     {
18       "Station_Id_d":737567,
19       "location":{
20         "type":"Point",
21         "coordinates":[
22           117.908299999999997,
23           30.622499999999999
24         ]
25       },
26       "PRE_1h":"0",
27       "TEM":"18.5",
28       "VIS":null
29     },
30   ]
31 }