ajatkj / scriptable

Scriptable scripts for iOS
308 stars 62 forks source link

Cannot get weather data #25

Closed Biscoooooooooo closed 8 months ago

Biscoooooooooo commented 8 months ago

IMG_1768 IMG_1767

ajatkj commented 8 months ago

Apparently, the API version for openweather has changed to 3.0.. You can update this in the above file-

From const baseWeatherURL='https://api.openweathermap.org/data/2.5/onecall';

to const baseWeatherURL='https://api.openweathermap.org/data/3.0/onecall';

I will push an update to the scripts soon.

Biscoooooooooo commented 8 months ago

I change it to 3.0 but it is still not working image

ajatkj commented 8 months ago

Do you see any errors when you run the script in scriptable? Unfortunately, I don't have a device right now where I can test this myself but should be available in few days.

Biscoooooooooo commented 8 months ago

I changed it But I still can’t get data

ajatkj commented 8 months ago

Apparently your old openweather api key won't work with 3.0 API call. You will need to "Subscribe" to openweather's new "One Call API 3.0" subscription which offers 1000 free API calls per day and charges there after.

More information here.

I have been meaning to rewrite these scripts to use weather data from shortcuts app and pass it on to scriptable but haven't got much time to work on it yet. Hopefully sometime in the near future.

Biscoooooooooo commented 8 months ago

So I need to 「subscribe」it ?