Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


More on LinuxToday


Code Project: Use weather for wallpapers

Jul 08, 2009, 07:34 (0 Talkback[s])

"Sure enough, a quick search for "weather API data" provides a whole host of links. Our criteria are: the API must be easy to understand, cover as much of the world as possible and have some reasonable documentation. This rules out a couple of promising sources, mostly on the documentation front - yes, it's possible to spend your time and effort making sense of the data or how the API works, but why would you if someone else provides both the data and a guide on how to use it?

"After much fiddling about, it seems that Yahoo's weather service fits our needs well. It's pretty straightforward, and has enough documentation to get us started without much effort. A bit of digging around yields http://developer.yahoo.com/weather, which provides plenty of detail and some examples of how to use the service. Bonus points to Yahoo!

"The Yahoo method of working is to append a location identifier to the end of a URL. The service will then provide an RSS feed of the weather data for that area. This is useful in some respects, because it means we can try it out without actually writing any code. It should also be easy enough to find the location code - the documentation suggests just going to the main weather page, typing in our city and taking a good look at the URL it takes us to."

Complete Story

Related Stories: