class WeatherWebApi {

    public List<LocationInfo> search(String query) {
        String path = HOST + String.format(PATH_SEARCH, query, WEATHER_KEY);
        List<LocationInfo> locations = new ArrayList<>();
        Iterator<String> reader = request.getLines(path).iterator();
        while (reader.hasNext()) {
            String line = reader.next();
            if(line.startsWith("#")) continue;
            locations.add(LocationInfo.valueOf(line));
        }
        return locations;
    }

    public  WeatherWebApi(Request request);

}