From a4f947dfe65300a861b6b0588b8558bb815894fd Mon Sep 17 00:00:00 2001 From: jaybeepee Date: Mon, 26 Sep 2016 15:57:19 +0200 Subject: [PATCH] Update YahooWeatherApiClient.java --- .../FWeather/updater/weather/YahooWeatherApiClient.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/FWeather/src/main/java/net/frakbot/FWeather/updater/weather/YahooWeatherApiClient.java b/FWeather/src/main/java/net/frakbot/FWeather/updater/weather/YahooWeatherApiClient.java index b41713e..4f1aaf9 100644 --- a/FWeather/src/main/java/net/frakbot/FWeather/updater/weather/YahooWeatherApiClient.java +++ b/FWeather/src/main/java/net/frakbot/FWeather/updater/weather/YahooWeatherApiClient.java @@ -408,15 +408,12 @@ public static List findLocationsAutocomplete(String starts } private static String buildWeatherQueryUrl(String woeid) { - // http://developer.yahoo.com/weather/ - return "http://weather.yahooapis.com/forecastrss?w=" + woeid + "&u=" + sWeatherUnits; + return "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D" + woeid + "&appid=" + FWeatherApplication.getApiKey(); } private static String buildPlaceSearchUrl(Location l) { // GeoPlanet API - return "http://where.yahooapis.com/v1/places.q('" - + l.getLatitude() + "," + l.getLongitude() + "')" - + "?appid=" + FWeatherApplication.getApiKey(); + return "http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20geo.places%20WHERE%20text%3D%22(" + l.getLatitude() + ", " + l.getLongitude() +")%22&appid=" + FWeatherApplication.getApiKey(); } private static String buildPlaceSearchStartsWithUrl(String startsWith) { @@ -439,4 +436,4 @@ public static class LocationSearchResult { public String displayName; public String country; } -} \ No newline at end of file +}