DarkSky end of life next january - How to replace
Philippe SCHMUCK
philippe-schmuck at orange.fr
Tue Sep 27 12:22:49 EDT 2022
Hi all,
It is pretty straightforward to try and get some data from Visualcrossing.
Create an account (free).
Sign in.
Go to https://www.visualcrossing.com/weather-api <https://www.visualcrossing.com/weather-api>
Enter your location and click on "Build your first Weather API query »
This will give you the URL you can copy and paste in a new window.
A quick and dirty Applescript example to give you an idea on how it is quite easy to get your data:
try
with timeout of 20 seconds
set P_URL to "curl " & quote & "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/YOURLOCATION/today?include=fcst%2Cobs%2Chistfcst%2Cstats%2Cdays&key=YOURAPIKEY&contentType=json" & quote
set P_text to do shell script P_URL
end timeout
on error errMsg number errNum
write log "Script Visualcrossing - Curl - Error Num : " & errNum & " - Error Msg : " & errMsg
end try
try
set myRecord to parse json P_text
on error
write log "Script Visualcrossing - There was an error parsing the JSON data!"
return
end try
set thedailyTendency to xdescription of myRecord
write log "Script Visualcrossing - thedailyTendency : " & thedailyTendency
set thedailyRecord to get |days| of myRecord
repeat with thisRecord in thedailyRecord
set thedailyForecast to xdescription of thisRecord
write log "Script Visualcrossing - thedailyForecast : " & thedailyForecast
set thedailytempMax to tempMax of thisRecord as real
set thedailytempmin to tempmin of thisRecord as real
set thedailytemp to temp of thisRecord as real
write log "Script Visualcrossing - thedailytemp : " & thedailytemp & " - thedailytempmin : " & thedailytempmin & " - thedailytempMax : " & thedailytempMax
end repeat
Philippe
> Le 27 sept. 2022 à 17:07, Michel Angelo <michel_angelo at me.com> a écrit :
>
>
> Hello. On 27 sept. 2022 at 15:56, James Sentman <james at sentman.com <mailto:james at sentman.com>> wrote
> :
>> I’ve been looking for an alternative weather API ever since Dark Sky shut theirs down. Technically it was Apple that shut them down as it wanted their super local forecasts in it’s own weather app and so has no plans to offer it to other people any longer than they have to.
>>
>> I’ve had a quick look at the Tempest stuff but it seems to be that you need a tempest weather station to have an account with them? I can’t see a way to create an account and get an auth token that doesn’t start with my buying a device. If anyone knows differently or has experimented with it please let me know.
>>
>> I’ve started several times over the years to write a direct plugin for the NOAA national weather data stuff as that is free for regular individual use, or was the last time I looked, it’s just more complex and I don’t think offers the same highly localized forecasts that Dark Sky used to. I know I’ve asked for suggestions here in the past and then basically dropped it when the sites either wouldn’t work easily or would cost a subscription.
>>
>> That being said if anyone has any ideas better than the national weather data please do chime in with more info.
>
> Today, DarkSky works. Can we assume it does so at no incremental cost to Apple ? If then keeping the API (or whatever else we need on xtension) alive does not cost anything to Apple, and considering the fact that xTension runs exclusively on Apple machines, is it silly to tell Aple the matter in which we use the API and request from Apple, for the purpose of using it in xTension the right to keep on using the API and hence the preservation, by Apple, of the Darksky API (to the extent it is needed for our use) ?
>
> We are old-time customers dammit
>
> Just my 2c.
>
> —
> Michel Angelo
> <michel_angelo at me.com <mailto:michel_angelo at me.com>>
>
>
>
> _______________________________________________
> XTensionList mailing list
> XTensionList at machomeautomation.com <mailto:XTensionList at machomeautomation.com>
> http://mail.machomeautomation.com/mailman/listinfo/xtensionlist <http://mail.machomeautomation.com/mailman/listinfo/xtensionlist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20220927/320614d3/attachment.html>
More information about the XTensionList
mailing list