Projects/Plasma/Weather/Ions: Difference between revisions
(Add first version of the Ion naming spec, also describe very briefly what kind of requests Ion should be able to handle to work with the applet.) |
(Fix some units) |
||
Line 28: | Line 28: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Credit || | | Credit || string || The credit for the data provider | ||
|- | |- | ||
| | | Country || string || The country where the weather station is located | ||
|- | |- | ||
| | | Place || string || City, territory and perhaps other information where the weather station is located | ||
|- | |- | ||
| Region || | | Region || string || Region where the weather station is located | ||
|- | |- | ||
| Station || | | Station || string || Name of the station | ||
|} | |} | ||
Line 44: | Line 44: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Observation Period || | | Observation Period || date || How often the weather status is updated | ||
|- | |- | ||
| Current Conditions || | | Current Conditions || conditions || Current weather conditions | ||
|} | |} | ||
Line 54: | Line 54: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Temperature || | | Temperature || int || Temperature observed | ||
|- | |- | ||
| Temperature Unit || | | Temperature Unit || C,F || The format of the temperature is in | ||
|} | |} | ||
Line 64: | Line 64: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Wind Direction || | | Wind Direction || int || Direction of the wind in degrees | ||
|- | |- | ||
| Wind Speed || | | Wind Speed || int || Speed of the wind | ||
|- | |- | ||
| Wind Speed Unit || | | Wind Speed Unit || mph,km/h,m/s,bft || The format of the wind speed | ||
|- | |- | ||
| Wind Gust || | | Wind Gust || int || Wind gust | ||
|- | |- | ||
| Wind Gust Unit || | | Wind Gust Unit || mph,km/h,m/s,bft || The format of the wind gust | ||
|- | |- | ||
| Windchill || | | Windchill || int || Wind chill | ||
|- | |- | ||
| | | Windchill Unit || C,F || The format of the wind chill | ||
|- | |- | ||
| | | Humidex || int || Humidex | ||
|} | |} | ||
Line 86: | Line 86: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| | | Humidity || int || Humidity in percents | ||
|- | |- | ||
| Dewpoint || | | Dewpoint || int || Dewpoint | ||
|- | |- | ||
| Dewpoint Unit || | | Dewpoint Unit || C,F || The format of the dewpoint | ||
|- | |- | ||
| Pressure || | | Pressure || int || Air pressure | ||
|- | |- | ||
| Pressure Unit || | | Pressure Unit || kPa/in, others later || The format of the air pressure | ||
|- | |- | ||
| Pressure Tendency || | | Pressure Tendency || string || Tendency of the pressure | ||
|- | |- | ||
| Visibility || | | Visibility || int || Visibility | ||
|- | |- | ||
| Visibility Unit || | | Visibility Unit || mi/km || Visibility unit | ||
|} | |} | ||
Line 108: | Line 108: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Sunrise At || | | Sunrise At || time || When the sun rises | ||
|- | |- | ||
| Sunset At || | | Sunset At || time || When the sunset happens | ||
|- | |- | ||
| Moonrise At || | | Moonrise At || time || When the moon rises | ||
|- | |- | ||
| Moonset At || | | Moonset At || time || When the moonset happens | ||
|- | |- | ||
| UV Index || | | UV Index || int || Ultraviolet index as integer | ||
|- | |- | ||
| UV Rating || | | UV Rating || string || Ultraviolet rating in text | ||
|} | |} | ||
Line 126: | Line 126: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Record High Temperature || int || | | Record High Temperature || int || The temperature record for the day | ||
|- | |- | ||
| Record Low Temperature || | | Record Low Temperature || int || The low temperature record for the day | ||
|- | |- | ||
| Record Rainfall || | | Record Rainfall || int || The rainfall record for the day | ||
|- | |- | ||
| Record Rainfall Unit || | | Record Rainfall Unit || in/mm || The format of rainfall | ||
|- | |- | ||
| Record Snowfall || | | Record Snowfall || int || The snowfall record for the day | ||
|- | |- | ||
| Record Snowfall Unit || | | Record Snowfall Unit || in/cm || The format of the snowfall | ||
|} | |} | ||
Line 144: | Line 144: | ||
! Key !! Value type !! Description | ! Key !! Value type !! Description | ||
|- | |- | ||
| Long Forecast Day <something?> || | | Long Forecast Day <something?> || ? || The forecast for up to eight days | ||
|- | |- | ||
| Short Forecast Day <something> || | | Short Forecast Day <something> || ? || The forecast for up to five days | ||
|} | |} |
Revision as of 22:38, 19 May 2008
Introduction
This page describes the general naming specification and other information regarding to the Ions. All the data may not be used by the applet(s). If you are going to write an applet or an Ion you should follow this specification to make all parts compatible to eachother.
Applet requests
The updateIonSource() of the Ion should answer to two requests, validate and weather.
When adding the source in the settings dialog of the applet, it will request validation from the Ion. When the Ion has been added, the applet will request for weather information by issuing weather request when it wants to get weather data. See the following chapters for information regarding to these requests.
Answering to validation request
validate request has multiple options and it's answers may differ:
When the validate|place is requested, the engine should validate the give place and set the data depending on what happened:
- ionname|valid|single|place|[place name] is being set the value of validate key of the source when there is one matching place for the search.
- ionname|valid|multiple|place|[place name]|place|[place name] is being set the value of validate key of the source when there is multiple choices available. The places are separated with '|'.
- ionname|invalid|single|[place] is being set the value of the validate key of the source when the search gives no matches.
Answering to the weather information request
When the weather request is made the Ion should set the appropriate data for the requested source.
Naming scheme
Location data
Key | Value type | Description |
---|---|---|
Credit | string | The credit for the data provider |
Country | string | The country where the weather station is located |
Place | string | City, territory and perhaps other information where the weather station is located |
Region | string | Region where the weather station is located |
Station | string | Name of the station |
Observation data
Key | Value type | Description |
---|---|---|
Observation Period | date | How often the weather status is updated |
Current Conditions | conditions | Current weather conditions |
Temperature fields
Key | Value type | Description |
---|---|---|
Temperature | int | Temperature observed |
Temperature Unit | C,F | The format of the temperature is in |
Wind data
Key | Value type | Description |
---|---|---|
Wind Direction | int | Direction of the wind in degrees |
Wind Speed | int | Speed of the wind |
Wind Speed Unit | mph,km/h,m/s,bft | The format of the wind speed |
Wind Gust | int | Wind gust |
Wind Gust Unit | mph,km/h,m/s,bft | The format of the wind gust |
Windchill | int | Wind chill |
Windchill Unit | C,F | The format of the wind chill |
Humidex | int | Humidex |
Air conditions
Key | Value type | Description |
---|---|---|
Humidity | int | Humidity in percents |
Dewpoint | int | Dewpoint |
Dewpoint Unit | C,F | The format of the dewpoint |
Pressure | int | Air pressure |
Pressure Unit | kPa/in, others later | The format of the air pressure |
Pressure Tendency | string | Tendency of the pressure |
Visibility | int | Visibility |
Visibility Unit | mi/km | Visibility unit |
Key | Value type | Description |
---|---|---|
Sunrise At | time | When the sun rises |
Sunset At | time | When the sunset happens |
Moonrise At | time | When the moon rises |
Moonset At | time | When the moonset happens |
UV Index | int | Ultraviolet index as integer |
UV Rating | string | Ultraviolet rating in text |
Key | Value type | Description |
---|---|---|
Record High Temperature | int | The temperature record for the day |
Record Low Temperature | int | The low temperature record for the day |
Record Rainfall | int | The rainfall record for the day |
Record Rainfall Unit | in/mm | The format of rainfall |
Record Snowfall | int | The snowfall record for the day |
Record Snowfall Unit | in/cm | The format of the snowfall |
Key | Value type | Description |
---|---|---|
Long Forecast Day <something?> | ? | The forecast for up to eight days |
Short Forecast Day <something> | ? | The forecast for up to five days |