Description
The Local Weather Interface Asset (IA) is an off-the-shelf component of Intuiface that displays local weather information for a city of your choice.
This IA is based on the public REST-based Web Service API offered by World Weather Online.
Using the Local Weather Interface Asset
Any Intuiface user can modify the default visual representation of the Local Weather IA. Your visual representation - specified by a data template - can access and manipulate any of the properties listed later in this article.
You can also directly download the Weather Templates from the Design Accelerators
These templates can be used as they are or you can customize them any way you want
Refresh weather dataThe Weather IA will not automatically refresh its data. To refresh it, use any trigger such as a timer to call the Weather IA's Refresh action.
Your refresh frequency shouldn't be shorter than every 10 minutes. In addition, as noted below, there is a limit to how many calls can be made per day for a given account with World Weather Online. This limit will be shared by all devices using the same API key.
Properties, Triggers & Actions
Properties
To configure your weather feed, there are five properties exposed in Composer's Properties panel for the Local Weather IA.
- Location Name of the city for which you would like to know the weather
- Language Determines both language used in the weather feed and data formats
- API key Optional API key for creating personal weather feeds. See this section below for more information.
- Number of days Specifies the number of days in the future retrieved for a forecast
- Forecast interval Specifies the intervals used for each day in the forecast
World Weather Online shares a rich set of weather information. Using the Local Weather IA you have access to:
- 27 properties as per the chart below (you can click on it to see the hi-def image):
Actions
- Set API key changing the API key using Intuiface Composer: NOTE: Use of this action risks exposure of your API key to others. Take care of its use.
- Set forecast interval specify the forecast interval
- Set language specify the language
- Set location string containing the city name passed to the REST Web Service
- Set number of days number of days to display
- Refresh updates weather information
Accessing additional information through the Weather IA
If you'd like more than a 5 day forecast or if you need to support a large number of requests/day - more than 100/day shared by all of your Players - you need to get your own API key.
To get your own API key, go to World Weather Online and select the appropriate plan. There is no free API key.
Once you have your own API key, enter it in the API Key property of the Local Weather IA (see screenshot below):
Comments
0 comments
Article is closed for comments.