@@ -0,0 +1,1892 @@
+package rs.elfak.mosis.marko.discounthunt.api.endpoints;%0A%0Aimport com.android.volley.NetworkResponse;%0Aimport com.android.volley.Request;%0Aimport com.android.volley.Response;%0Aimport com.android.volley.toolbox.JsonObjectRequest;%0Aimport com.android.volley.toolbox.JsonRequest;%0A%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0Aimport rs.elfak.mosis.marko.discounthunt.DiscountHunt;%0A%0Apublic class BaseEndpoint %7B%0A%0A    public static final String API_URL = %22%22;%0A%0A    private String url;%0A    public BaseEndpoint(String path) %7B%0A        this.url = API_URL + path;%0A    %7D%0A%0A    public void get(int id, Response.Listener successListener,%0A                    Response.ErrorListener errorListener) %7B%0A        execute(url + %22/%22 + id, Request.Method.GET, null, successListener, errorListener);%0A    %7D%0A%0A    public void post(JSONObject requestBody, Response.Listener successListener,%0A                    Response.ErrorListener errorListener) %7B%0A        execute(url, Request.Method.POST, requestBody, successListener, errorListener);%0A    %7D%0A%0A    public void put(int id, JSONObject requestBody, Response.Listener successListener,%0A                    Response.ErrorListener errorListener) %7B%0A        execute(url + %22/%22 + id, Request.Method.PUT, requestBody, successListener, errorListener);%0A    %7D%0A%0A    public void delete(int id, JSONObject requestBody, Response.Listener successListener,%0A                    Response.ErrorListener errorListener) %7B%0A        execute(url + %22/%22 + id,Request.Method.DELETE, requestBody, successListener, errorListener);%0A    %7D%0A%0A    private void execute(String url, int type, JSONObject requestBody, Response.Listener successListener,%0A                         Response.ErrorListener errorListener) %7B%0A        JsonObjectRequest request = new JsonObjectRequest(type,%0A                url, requestBody, successListener, errorListener);%0A%0A        DiscountHunt.requestQueue.add(request);%0A    %7D%0A%7D%0A

Implement BaseEndpoint class using Volley