Class AerisAbstractTask

    • Constructor Detail

      • AerisAbstractTask

        public AerisAbstractTask​(android.content.Context context)
        Constructs the abstract with the context .
        Parameters:
        context - contex to use.
    • Method Detail

      • requestClosestWithCurrentLoc

        public void requestClosestWithCurrentLoc()
        Request a observation at the closest location using the phones gps.
      • requestClosestWithCurrentLoc

        public void requestClosestWithCurrentLoc​(Parameter... params)
        Request to the API at the closest location using the phones gps.
        Parameters:
        params - optional
      • requestClosest

        public void requestClosest​(PlaceParameter place)
        Request to the API at the closest location to the place parameter
        Parameters:
        place - place parameter to use
      • requestClosest

        public void requestClosest​(PlaceParameter place,
                                   Parameter... params)
        Request to the API at the closest location to the place parameter with additional parameters
        Parameters:
        place - place parameter to use
        params - additional parameters to use in the request
      • requestWithinPolygon

        public void requestWithinPolygon​(List<AerisLocation> locs)
        /** Request to the API within the polygon of locations.
        Parameters:
        locs - list of AerisLocations to use as a polygon.
      • requestWithinPolygon

        public void requestWithinPolygon​(List<AerisLocation> locs,
                                         Parameter... params)
        Request to the API within the polygon of locations with additional parameters
        Parameters:
        locs - list of AerisLocations to use as a polygon.
        params - additional parameters to use in the request
      • requestWithinBounds

        public void requestWithinBounds​(double nLatitude,
                                        double wLongitude,
                                        double sLatitude,
                                        double eLongitude)
        Request to the API within the bounds of a northwest and southeast point.
        Parameters:
        nLatitude - Northern latitude point
        wLongitude - western longitude point
        sLatitude - southern latitude point
        eLongitude - eastern longitude point
      • requestWithinBounds

        public void requestWithinBounds​(double nLatitude,
                                        double wLongitude,
                                        double sLatitude,
                                        double eLongitude,
                                        Parameter... params)
        Request to the API within the bounds of a northwest and southeast point with additional parameters
        Parameters:
        nLatitude - double
        wLongitude - double
        sLatitude - double
        eLongitude - double
        params - optional
      • withDebug

        public void withDebug​(boolean enabled)
        Adds the debug output for the request.
        Parameters:
        enabled - whether the debug output to logcat should be on for this task.
      • requestSearch

        public void requestSearch​(Parameter... params)
        Parameters:
        params - optional
      • getType

        public abstract EndpointType getType()
        Get the type of the Endpoint
        Returns:
        endpoint type
      • callback

        public abstract void callback​(List<AerisDataJSON> responses)
        Passed callback to the proper concrete class's callback.
        Parameters:
        responses - List of data responses the concrete class should handle passing to its callback
      • onFail

        public abstract void onFail​(AerisError error)
        Passes error callback to the proper concrete class's fail callback.
        Parameters:
        error - error to pass back