This isn't a tip or a trick, it's just the first REST API call that I have made work.
This is a very simple API to get the weather conditions from https://openweathermap.org
To use it you will need to register and obtain a key.
Store the Key in SystemsSettings.KeyWeather and store it as '&APPIDxxxxxxxxxxx', where x is the key you got from open weather.org
The Service BO is Weather.
The Parameters for Weather are loaded into a temporary BO called tWeather with one attribute:
tWeather.parameters - this collates the elements that come after the ? in the REST Call (i.e. 'q='+City.Name+','+City.Country+SystemSettings.KeyMap)
There is one actual BO, City:
City.Country
City.Name
and then a bunch of fields to store the weather in.
The response is JSON and is loaded into:
WeatherResponse which contains a number of OB attributes to:
WeatherResponseCoord
WeatherResponseMain
WeatherResponseWeather
To use:
Launch into the home page
Create a few City objects from the limited number of Countries available.
If you don't put a real city in then the process will fail (gracelessly - I haven't put in error checking)
Then from the grid press the Get Weather button
The City BO will then be updated with some weather details.
Its not super complicated but it may help someone work through the various steps.
This was built with AIM v 8.1 Build 2441
There is still an error appearing in the console, but it doesn't appear to be affecting the API