yahoo-weather-java-api icon indicating copy to clipboard operation
yahoo-weather-java-api copied to clipboard

Getting temperatures for the day

Open Ad00t opened this issue 8 years ago • 2 comments

It seems to me that calling channel.getItem().getForecasts().get(0).getLow() gets the lowest temperature of the day, which includes the night. Is there any way to remove the nighttime temperatures from whatever list it picks the lowest temperature from so only daylight hour temperatures are used?

Ad00t avatar Oct 28 '17 05:10 Ad00t

Also, am I correct in assuming that the index of getForecasts().get() 0 gets today, 1 gets tomorrow, 2 gets the day after tomorrow, and so on and so forth?

Ad00t avatar Oct 28 '17 05:10 Ad00t

Hi @Pr1ckl3s, the library simply queries the Yahoo Weather service (https://developer.yahoo.com/weather/) and gets back his result as Java objects. GetLow returns the lowest temperature during the day, I don't see other information from the Yahoo service. Your assumption about the forecasts seems correct, anyway for each forecast you can get the referred day (getDate) method.

fedy2 avatar Oct 29 '17 19:10 fedy2