Im wanting to use wunderground PWS (personal weather station) data in a custom page.
I don’t need to use all the data in the json/php/xml file, or which one is best for whats needed.
Using “api.wunderground.com/api/(API KEY)/conditions/q/pws:(STATIONID).(json/php/xml)” to get the current data, how would i implement this in to a page?
Here is an jQuery ajax call to get the info from your url (don’t forget to include your key where it says “Your_Key”). *Note I used a url from the examples at api.wunderground.com
If you place this in a html widget you can then present the response information wherever you need. I guess you could include this in the Head HTML too if you prefer.
.done (function(data) {
var myVar = document.getElementById("myID");
myVar.innerHTML = "whatever data you want returned"; // in a object call like data.response.termsofService;
}
you would store your information or present it like above inside an element. You could do this with however many elements and bits of data you need all within this function. Maybe have a read up on ajax and json to see what stuff you can do.