Obtaining the geographic location from the IP address is a problem that has already been solved in this chapter.
In this last section, we will build another extractor that will be used in the following chapters. Now, suppose we want to know the current temperature of a given a geographic location at a specific time. To achieve this, we use the OpenWeatherService.
Visit the Open Weather page: https://openweathermap.org/.
To obtain a free API key register in a free plan; this key is needed to access the free API.
Now, create a file called OpenWeatherService.java in the src/main/java/monedero/extractors directory with the content of Listing 3.7:
package monedero.extractors;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.net.URL;
import java.util.logging.Level;
import...