package com.github.dvdme.ForecastIOLib;

public class FIOMinutely {

	FIODataBlock minutely;

	public FIOMinutely(ForecastIO fio){

		init(fio);

	}

	private void init(ForecastIO fio){

		if(fio.hasMinutely()){
			this.minutely = new FIODataBlock(fio.getMinutely());
			this.minutely.setTimezone(fio.getTimezone());
		}
		else {
			this.minutely = null;
		}
	}

	/**
	 * Returns the data point for the given minute in the minutely report
	 * @param minute the minute to get
	 * @return return the data point with the report
	 */
	public FIODataPoint getMinute(int minute){

		return this.minutely == null ? null : this.minutely.datapoint(minute);  
	}

	/**
	 * Returns the minutes in the minutely report
	 * @return integer with the number of minute. Returns -1 if there is not data in the report.
	 */
	public int minutes(){
		return this.minutely == null ? -1 : this.minutely.datablockSize();
	}

}

@@ -932,14 +932,350 @@
 ();%0D%0A%09%7D%0D
+%0A%09%0D%0A%09/**%0D%0A%09 * Returns forecast summary%0D%0A%09 * @return forecast summary or null%0D%0A%09 */%0D%0A%09public String getSummary() %7B%0D%0A%09%09return minutely == null ? null : minutely.summary();%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Returns forecast icon%0D%0A%09 * @return forecast icon or null%0D%0A%09 */%0D%0A%09public String getIcon() %7B%0D%0A%09%09return minutely == null ? null : minutely.icon();%0D%0A%09%7D%0D
 %0A%0D%0A%7D%0D%0A

add summary and icon to minutely forecast