Weather Widget - Akumina Community

Weather Widget

Estimated reading time: 2 min

 

Main Features

  • Weather location can be preset or detected based on current user’s city attribute if using targeting
  • Mobile-ready via Responsive Web Design

 

Weather Widget Setup

API Signup and Information

The Yahoo Weather API was officially deprecated on Jan 3, 2019. As a result, all applications connecting to the API returned a 404. However, Yahoo offered an alternative API that requires a bit more setup than usual.

    1. Go to the Yahoo Weather API Webpage.
    2. Follow the first step in the list to create an App under your Yahoo account.
    3. Fill out the form below to request your application being whitelisted by the Yahoo API Team.
      • https://goo.gl/forms/ixXUBJ00xMQc5ne23
      • NOTE: As this widget was under development, no email response was received over the course of 12 calendar days, despite the instructions clearly stating 3 business days and an email response. Your mileage may vary.
    1. Yahoo’s Weather API Team is pretty responsive, often getting back to you the same day and offering a fair amount of technical advice.
      • yahoo-weather-ydn-api@oath.com

 

Digital Workplace Configuration

    1. There are only a few steps to complete to finish the setup process for the Weather Widget.
    2. Launch App Manager -> Management Apps -> Widget Manager.
    3. Scroll down to the WeatherWidget.
    4. Create a new instance for the WeatherWidget or use the default instance.
    5. By default, the following properties are left empty:
      • Appid
      • Consumerkey
      • Consumersecret
    1. Navigate to https://developer.yahoo.com/apps/.
    2. Locate the app you created in the previous section and open the page.
    3. The app page contains all three pieces of information required in the WeatherWidget. Copy these over and save your changes.
    4. You’re done.

 

Please be aware that the weather widget will only use your current location if Azure Active Directory is enabled. Otherwise, it will use the location defined in the widget properties.

 

Widget Properties Example Instance

 

Property Details
City City for the default Postal Code.  This is required as the weather API service does not return the city associated with the Postal Code.  If using targeting, the City will be read from the current user’s profile data along with the postal code.
State State for the default Postal Code.  This is required as the weather API service does not return the state associated with the Postal Code. If using targeting, the State will be read from the current user’s profile data along with the postal code.
postalcode Postal Code is used to communicate with the weather API service to retrieve the weather data.  If not using targeting (user location attribute) then the location displayed is this postal code location.  If using targeting, the current user’s postal code (if it exists) will override this value.
callbackmethod N/A for this instance
cacheinterval Sets the time (in secs) that the data should be saved in the local browser cache of the current user.

0 = do not cache the data for this widget

-1 = use the default caching strategy set in the Digital Workplace configuration

[whole number] = cache for specified time (secs)

uicallbackmethod
VIEW View Name = Weather

View Template URL =

/Style%20Library/DigitalWorkPlace/Content/Templates/WeatherWidget/Weather.html

 

Was this article helpful?
Dislike 0
Views: 21
//]]>