package com.nikolak.weatherapp.ForecastIO;



import org.json.JSONException;
import org.json.JSONObject;

public class Forecast {
    public Currently currently = new Currently();
    public Hourly hourly = new Hourly();
    public Daily daily = new Daily();

    private ForecastAPI forecastAPI = new ForecastAPI();

    public Boolean updateForecast(String lat, String lon) throws JSONException {
        JSONObject response = forecastAPI.getDefault(lat, lon);
        if (response==null) {
            return false;
        }

        JSONObject currentlyJObject = response.getJSONObject("currently");
        this.currently.ConstructFromJson(currentlyJObject);

        JSONObject hourlyJObject = response.getJSONObject("hourly");
        this.hourly.constructFromJson(hourlyJObject);
        return true;
    }


}

@@ -39,16 +39,42 @@
 tIO;%0A%0A%0A%0A
+import android.util.Log;%0A%0A
 import o
@@ -96,16 +96,16 @@
 eption;%0A
-
 import o
@@ -195,24 +195,71 @@
 urrently();%0A
+    public Minutely minutely = new Minutely();%0A
     public H
@@ -667,24 +667,24 @@
 urrently%22);%0A
-
         this
@@ -728,24 +728,381 @@
 yJObject);%0A%0A
+        try%7B%0A            JSONObject minutelyJObject = response.getJSONObject(%22minutely%22);%0A            if (minutelyJObject!=null)%7B%0A                minutely.constructFromJson(minutelyJObject);%0A            %7D else%7B%0A                minutely = null;%0A            %7D%0A        %7D catch (JSONException e)%7B%0A            Log.d(%22Json%22, %22Minutely not available%22);%0A        %7D%0A%0A
         JSON

Add minutely parsing