Wait is over
Woot!
Just updated WeatherCat and tested the API function on my test site ... works great!
one question - from the wiki:
The URL of the API script is simply the URL of your template folder and api.php. The api.php is in the template root folder. You then set the interval, the database will be updated every 5 minutes, but you can set the interval of calling the API to something shorter. The API script will cache the data and update the database every 5 minutes using aggregated data from the cache file. This is also advantageous because upon each trigger of the API script, a file of current conditions is saved.
Assumptions
1) the cache file is in cache/apiCache.txt
2) Current version of WeatherCat released with the API does not provide the ability to change the API call interval that I can find - anyone know what the interval default is, or how to change it
2a) assuming the interval is set in a plist file somewhere and could be modified to 1m and then would get an updated apiCache.txt every 60s and the DB would get updated by the API ever 5m
Question
Will the API work with HTTPS as the transport rather than HTTP? (haven't tested yet, but my production site is all HTTPS (http being redirected to HTTPS if used)
Hi,
HTTPS - should not be an issue
Interval - the way this works is:
you can call the api.php at any interval (must be less than 5 min though), one user uses even just 2s, but for that you have to make sure your server can handle this.
Each time the api is called, a "live" file is created - used for all live blocks, gauges etc. Then it checks if it is time to update the db (5 min), if not, it saves the data to the apiCache. Then once 5 minutes passes, it aggregates and processes the cache, updates the db and clears the cache and the process repeats.
The interval at which you call the api.php is something you should be able to set in WC - or at least thats what I told the developers, including Stu. This is how it works. I do not have WC so I cannot check if that is really how it works - all I can say is - hopefully yes