Hi all,
Forgive me possibly simple question, but I am very new to this and just trying to learn (by doing).
I want to make simple widget, that is showing the current wind speed, but also history of the wind speed as a chart (e.g., last 4-8hrs). After few painful evenings of digging documentation and this forum, I managed to display the wind speed, but have no idea how to proceed with chart. The major problem is that API returns it for given time, so to get a history I need to make several API calls, then parse each of it to get the speed, and (I guess) pass it to a variable so it can be drawn, e.g. as line using drawLine. I made makeRequest(delay) that takes delay as an argument to retrieve data from the past, but
1) how to execute multiple API calls?
2) how to pass the parse result into variable?
and finally 3) how to draw it ('for' loop of drawLine? other better way?)
For some reason I am not able to attach the code here ("you have been blocked" message), so here it is on GitHub.
Thanks for any help :)
A.