So i’m trying to make a weather app but can’t seem to get data out of the API.
Here is the code:
var api= “https://api.darksky.net/forecast/879f3d4aa91c701894de75f31f8c6773/56,24”
The console is empty and i don’t know what i did wrong…
Try logging the
data instead to see what is there.
Tried that aswell…
Here is the code pen: https://codepen.io/ArmoredCub/pen/vZxpqB
If you look at the console it says
$ is not defined, did you import jQuery?
That was the first thing i did but for me it does not even show that in the console
So it’s denying access to the API because of the key? Is there any way to fix that?
I would suggest you to use another API such as openweather, in fact I now remember that I faced the same issue as you when I did my project.
Search here in the forums, there are probably workarounds.
the apixu api helped me with building this app
Hope it can help!