Author Topic: WU API Almanac JSON Script, It's already here!  (Read 507 times)

0 Members and 1 Guest are viewing this topic.

Offline SLOweather

  • Administrator
  • Forecaster
  • *****
  • Posts: 3454
WU API Almanac JSON Script, It's already here!
« on: January 22, 2018, 06:32:24 PM »
Well, heck. You can't beat WxForum and good ol' Saratoga Ken!

I had the VWS almanac data of highs/lows/averages on my site for years. As y'all might know, that connection is broken, so I took it off. After yet another query about it today, I went a'searching WU for their API info. In short, here's what I need.

which returns

version   "0.1"
termsofService   ""
almanac   1
airport_code   "KSBP"
F   "63"
C   "17"
F   "82"
C   "27"
recordyear   "2014"
F   "42"
C   "5"
F   "30"
C   "-1"
recordyear   "2007"

Now I need to parse it. Did a search here and found this thread from 2012...

So, now, to keep within the 20 calls /day developer limit, I need to mash that up into something I can call from a cron job just after midnight and write to a table I can display.

Thanks, Ken, and the OP, CNYWeather!

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7381
  • Saratoga, CA, USA Weather - free PHP scripts
Re: WU API Almanac JSON Script, It's already here!
« Reply #1 on: January 22, 2018, 07:27:29 PM »
 8-)  I love code that stands the test of time (2012-2017.. not bad)
Ken True/Saratoga, CA, USA main site:
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1186
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: WU API Almanac JSON Script, It's already here!
« Reply #2 on: January 23, 2018, 11:13:36 AM »
It's a shame NWS doesn't stand that same test of time...  :roll: