For those interested:

Using Tim's starting place I built a 5250 application that presents the user with a personalized list of current weather in a subfile list of cities. My design goals were to:

* use 5250 to consume a .json web service.
* to make the application as mouse-able as I could.
* de-clutter the screen.
* have some fun.

I believe I did all that. please take a look. City Weather <http://www.martinvt.com/Web/Current_Weather/current_weather.html>

One obvious but unexpected take-away from the project Is that with an API you can only do what the API provides.  For instance, you can look up "Paris" or "Paris, US" and get correct information but "Paris, TX" and "Paris, AR" don't work predictably.  And, without a map you don't know which "Paris, US" you got.  Thus ends unexpected lesson 42.

Anyway...  I had fun with it.



On 11/19/2019 3:49 AM, Tim Fathers wrote:
Ok, here's a complete example of calling a JSON webservice from embedded RPG https://github.com/fathert/json-rpg-example/blob/master/open-weather.sqlrpgle

It uses the sample APIs provided at OpenWeatherMap (https://openweathermap.org/current#severalid) As it's only a sample API, any old input gives the same output, which you can see by clicking on the link on the website.

I hope this helps.

Tim.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.