use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class UserManager_Test method authenticateParentAirwolf.
public static void authenticateParentAirwolf(String airwolfDomain, RestBuilder adapter, RestParams params, String email, String password, StatusCallback<ParentResponse> callback) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("success").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "success".getBytes())).addHeader("content-type", "application/json").build();
retrofit2.Response response1 = retrofit2.Response.success(response);
callback.onResponse(response1, new LinkHeaders(), ApiType.API);
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class UserManager_Test method removeStudentAirwolf.
public static void removeStudentAirwolf(String airwolfDomain, RestBuilder adapter, RestParams params, String parentId, String studentId, StatusCallback<ResponseBody> callback) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("success").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "success".getBytes())).addHeader("content-type", "application/json").build();
retrofit2.Response response1 = retrofit2.Response.success(response);
callback.onResponse(response1, new LinkHeaders(), ApiType.API);
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class UserManager_Test method addParentAirwolf.
public static void addParentAirwolf(String airwolfDomain, RestBuilder adapter, RestParams params, Parent parent, StatusCallback<ParentResponse> callback) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("success").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "success".getBytes())).addHeader("content-type", "application/json").build();
retrofit2.Response response1 = retrofit2.Response.success(response);
callback.onResponse(response1, new LinkHeaders(), ApiType.API);
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class UserManager_Test method getObserveesForParent.
public static void getObserveesForParent(String airwolfDomain, RestBuilder adapter, RestParams params, String parentId, StatusCallback<List<Student>> callback) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("success").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "success".getBytes())).addHeader("content-type", "application/json").build();
retrofit2.Response response1 = retrofit2.Response.success(response);
callback.onResponse(response1, new LinkHeaders(), ApiType.API);
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class AlertThresholdManager method createAlertThreshold.
public static void createAlertThreshold(String airwolfDomain, String parentId, String studentId, String alertType, StatusCallback<AlertThreshold> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").build();
AlertThresholdAPI.createAlertThreshold(airwolfDomain, adapter, params, parentId, studentId, alertType, callback);
}
}
Aggregations