Making a Weather Skin
Now that you have an API Key, we can use this to start querying data and making skins
Last updated
Now that you have an API Key, we can use this to start querying data and making skins
Last updated
Now that you have an API key and the ID for your city of choice, you can get started on a skin. First we need to setup our variables
Plugin in the values you got from the OpenWeather website, and feel free to change the variable names
Units needs to be either imperial
or metric
. For Fahrenheit choose imperial, and for Celsius choose metric
Next we need to use a WebParser Measure to call the API:
This measure uses the methods detailed to call the OpenWeather API by a City ID:api.openweathermap.org/data/2.5/weather?id={city id}&appid={your api key}
We then use a regular expression to take out the most pertinent values such as the temperature, windspeed, etc. There are many more parameters that can be accessed which are detailed . Simply change the RegExp to parse different values.
Here's a full example skin (Loading this will do nothing):
For more help with syntax and making things your own checkout the manual:
When distributing your skin, you should not include the city code or API key used in development. Keep your values private, and instead direct end users to get their own.