Thread
:
Help me to code for Sailfish OS
View Single Post
Thoke
2020-08-23 , 18:53
Posts: 284 | Thanked: 661 times | Joined on Aug 2013 @ Finland
#
106
Found from here:
https://openweathermap.org/forecast5#call
Code:
api.openweathermap.org/data/2.5/forecast?zip={zip code},{country code}&appid={your api key}
so you can contstruct your url as per my previous suggestion.
EDIT: I had to check, but XMLHttpRequest doesn't allow cross-site requests, so it wont work without modifications. With a short look, it seems there's CORS and JSONP to circumvent the restriction, but I don't know if they're supported on SFOS, and this is also something I have no experience implementing.
I would try it anyways, though. Maybe there's no restrictions when using it when you are not actually doing this js stuff with a browser attached.
Last edited by Thoke; 2020-08-24 at
18:12
.
Quote & Reply
|
The Following 2 Users Say Thank You to Thoke For This Useful Post:
juiceme
,
Markkyboy
Thoke
View Public Profile
Send a private message to Thoke
Find all posts by Thoke