com.github.fedy2.weather
Class YahooWeatherService

java.lang.Object
  extended by com.github.fedy2.weather.YahooWeatherService

public class YahooWeatherService
extends Object

Main access point for the Yahoo weather service.

Author:
"Federico De Faveri defaveri@gmail.com"

Field Summary
static String DEGREES_PARAMETER_NAME
           
static String WEATHER_SERVICE_BASE_URL
           
static String WOEID_PARAMETER_NAME
           
 
Constructor Summary
YahooWeatherService()
           
YahooWeatherService(Proxy proxy)
           
 
Method Summary
 Channel getForecast(String woeid, DegreeUnit unit)
          Gets the Weather RSS feed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEATHER_SERVICE_BASE_URL

public static final String WEATHER_SERVICE_BASE_URL
See Also:
Constant Field Values

WOEID_PARAMETER_NAME

public static final String WOEID_PARAMETER_NAME
See Also:
Constant Field Values

DEGREES_PARAMETER_NAME

public static final String DEGREES_PARAMETER_NAME
See Also:
Constant Field Values
Constructor Detail

YahooWeatherService

public YahooWeatherService()
                    throws JAXBException
Throws:
JAXBException

YahooWeatherService

public YahooWeatherService(Proxy proxy)
                    throws JAXBException
Throws:
JAXBException
Method Detail

getForecast

public Channel getForecast(String woeid,
                           DegreeUnit unit)
                    throws JAXBException,
                           IOException
Gets the Weather RSS feed.

Parameters:
woeid - the location WOEID.
unit - the degrees units.
Returns:
the retrieved Channel.
Throws:
JAXBException - if an error occurs parsing the response.
IOException - if an error occurs communicating with the service.


Copyright © 2013. All rights reserved.