Difference between revisions of "General weather interface/v2.5"
(→API call examples) |
(→Parameters) |
||
Line 38: | Line 38: | ||
== Parameters == | == Parameters == | ||
+ | * '''lang''': optional, the language, default value is <code>zh_CN</code>, you can set any one of <code>zh_CN</code>, <code>zh_TW</code>, <code>en_US</code>, <code>en_GB</code>, <code>ja</code> | ||
+ | * '''unit''': optional, the unit system, default value is <code>metric</code>, you can set any one of <code>metric</code>, <code>imperial</code>, <code>SI</code> | ||
+ | * '''granu''': optional, the temporal granularity, default value is <code>realtime,minutely,hourly,daily</code>, you can set any one or combinations of <code>realtime</code>, <code>minutely</code>, <code>hourly</code>, <code>daily</code> | ||
+ | * '''hourlysteps''': optional, how many hours will be present in hourly forecast, default value is <code>48</code> hours and maximal value is <code>360</code> hours | ||
+ | * '''dailysteps''': optional, how many days will be present in daily forecast, default value is <code>5</code> days and maximal value is <code>15</code> days | ||
== Return values == | == Return values == |
Revision as of 08:03, 3 April 2020
Version of this article: v2.5,current stable version: v2.5,historical veriosns: v2.4
Contents
Authentication
After signing up at the dahsboard, you will get your access token. In below sections, we will use a temporary token for demo purpose: S45Fnpxcwyq0QT4b
. In production or development, you should use your own.
API call examples
Scenarios of weather apps
- New York: Weather forecast for New York including real time condition, 2h minutely precipitation forecast, 48h hourly general forecast, 5d daily general forecast, in English and Imperial and US customary measurement systems.
- Tokyo: Weather forecast for Tokyo including real time condition, 2h minutely precipitation forecast, 48h hourly general forecast, 5d daily general forecast, in Japanese and Metric measurement system.
Scenarios of planning software
- Short term: 24 hour hourly forecast
- Long term: 10 days daily forecast
Scenarios of scientific instrument
- Assume an instrument on an ocean drilling ship need to get hourly data for next 12 hour
Scenarios of Real-time cases
- Assume a drone control system need the current realtime weather data, but the data should be in SI unit system for convenience of control calculation.
Scenarios of webapps
- with jsonp callback
check_weather
Parameters
- lang: optional, the language, default value is
zh_CN
, you can set any one ofzh_CN
,zh_TW
,en_US
,en_GB
,ja
- unit: optional, the unit system, default value is
metric
, you can set any one ofmetric
,imperial
,SI
- granu: optional, the temporal granularity, default value is
realtime,minutely,hourly,daily
, you can set any one or combinations ofrealtime
,minutely
,hourly
,daily
- hourlysteps: optional, how many hours will be present in hourly forecast, default value is
48
hours and maximal value is360
hours - dailysteps: optional, how many days will be present in daily forecast, default value is
5
days and maximal value is15
days