Use the Dark Sky weather API in Drafts


#1

I made a quick demo action using the Dark Sky API to grab current weather conditions for your location and display them in a prompt - which also offers a link to the Dark Sky website for more details if needed.

To use the action, you’ll need to sign up for a Free Dark Sky API account and copy-paste in the API Key they give you the first time you run the action.

There’s lots more that could be done with this…the forecast API includes all sorts of detailed information…I just cherry-picked a few useful values to demonstrate.

Install the Dark Sky Forecast action

Once you sign in at Dark Sky, the below shows the API key value you will need to copy and paste into the prompt the first time you run the action:


#2

Is there a way to get the forecast of my current location time and date. Retrieve this info and put this into my current draft? No prompt but directly into the editor written down?


#3

I pasted in my API key but the action fails. I tried deleting the action and reinstalling, in case I put the key in wrong (?), but the action seems to have stored that key. How do I start over or re-input the key?


#4

Look at your credentials under Drafts’ internal settings, and Forget the Dark Sky API Key. Next time you run the action you should be prompted again for the key.


#5

Thanks sylumer. That worked!

However I re-input my key and the action still fails.


#6

Have a look at your log against the draft you ran the action against.

I’ve just downloaded the action for the first time, put in my API key and it ran okay for me.


#7

I could not get this to work, then I went to iPhone setting—>privacy—>location services and Drafts was blank. I turned on location services and bam-o it works.


#8

Me too! Thanks michaelw.