实况API指南
搜索类型:
使用LocationKey调取实况数据
http://{{api} or {{apidev}}.weathercn.com.com/currentconditions/{version}/{locationKey}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}}{&details={true or false}}{&getphotos=true or false} |
示例:
http://api.weathercn.com/currentconditions/v1/335315.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
http://api.weathercn.com/currentconditions/v1/349727.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&getphotos=true |
http://api.weathercn.com/currentconditions/v1/335315.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&language=es&details=true |
使用LocationKey调取过往实况数据(前6小时)
http://{{api} or {{apidev}}.weathercn.com/currentconditions/{version}/{locationKey}/historical{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}} {&details={true or false}} |
示例:
http://api.weathercn.com/currentconditions/v1/335315/historical.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
http://api.weathercn.com/currentconditions/v1/335315/historical.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&details=true |
使用LocationKey调取过往实况数据(前24小时)
http://{{api} or {{apidev}}.weathercn.com/currentconditions/{version}/{locationKey}/historical/24{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}{&language={language code}} {&details={true or false}} |
示例:
http://api.weathercn.com/currentconditions/v1/335315/historical/24.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |
http://api.weathercn.com/currentconditions/v1/335315/historical/24.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&details=true |
热门城市实况
http://{{api} or {{apidev}}.weathercn.com/currentconditions/{version}/topcities/{group}{.{format}}?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key}&language={language code} |
示例:
http://api.weathercn.com/currentconditions/v1/topcities/50.json?apikey={your key}&requestDate={YYYYMMDDHHm UTC}&accessKey={access key} |