jWeatherBug

(updated: 20014-04-14)

NOTE: The WeatherBug servers no longer supports this API. Refer to their new Pulse API.

Purpose: Demonstrates how to use the WeatherBug API with the Java programming language

Overview

WeatherBug provides an API to get weather information from their service. They provide data in both XML format and a custom format that they call "piped". The examples shown here use the XML format. The piped format is very simple if you'd rather go that route. The data is simply separated by the "|" (pipe) character. So you could use the StringTokenizer class to extract the data. But the code provided here shows how to get the XML document and use DOM to get the data.

To find out more about the WeatherBug API, do your own research. Go do a search on "WeatherBug Labs". They provide many other resources.

WeatherBug has rules for the use of the API. You must follow them if you intend to create a distributed application.

WeatherBug requires you to register (free), and with that registration you get a unique key which you then must include as part of the API calls. I have removed my key from the examples.

Download (see Attachments)

jWeatherBug_R20070803.zip - NetBeans 5.5 project, using Java 1.6.0_01 See the \src\jWeatherBug\Main.java file for more information on setup and background.

Terms of Use

Home

Copyright Steven R. Nickels, 2008. All rights reserved.