mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-10 18:55:03 +00:00
Finish V1 of List and Item Lambdas
List and Item Lambdas and client calls should be roughly finished (pending full testing once databse config is done).
This commit is contained in:
@@ -28,6 +28,12 @@ public class Requestor {
|
||||
getObject(id, classType, receiver, null);
|
||||
}
|
||||
|
||||
public <T> void getListOfIds(Class<T> ofType, Receiver<Integer[]> successHandler, RequestErrorHandler failureHandler) {
|
||||
String getURL = DEV_BASEURL + "/" + ofType.getSimpleName() + "?list=-1";
|
||||
Request postRequest = buildBaseRequest(getURL, "GET", null);
|
||||
launchCall(postRequest, successHandler, Integer[].class, failureHandler);
|
||||
}
|
||||
|
||||
public <T> void getObject(String id, Class<T> classType, Receiver<T> successHandler, RequestErrorHandler failureHandler) {
|
||||
String getURL = DEV_BASEURL + "/" + classType.getSimpleName() + "?id=" + id;
|
||||
Request postRequest = buildBaseRequest(getURL, "GET", null);
|
||||
|
||||
@@ -34,6 +34,6 @@ public class SynchronousReceiver<T> implements Requestor.Receiver<T>, Requestor.
|
||||
@Override
|
||||
public void acceptError(IOException error) {
|
||||
waiting = false;
|
||||
this.error = error
|
||||
this.error = error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user