Skip to content
This repository has been archived by the owner on Mar 19, 2020. It is now read-only.

Update YahooWeatherApiClient.java #124

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,12 @@ public static List<LocationSearchResult> 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) {
Expand All @@ -439,4 +436,4 @@ public static class LocationSearchResult {
public String displayName;
public String country;
}
}
}