use of com.instructure.canvasapi2.models.ParentResponse 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.models.ParentResponse 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.models.ParentResponse in project instructure-android by instructure.
the class UserAPI method authenticateParentAirwolf.
public static void authenticateParentAirwolf(@NonNull RestBuilder adapter, @NonNull RestParams params, @NonNull String email, @NonNull String password, @NonNull StatusCallback<ParentResponse> callback) {
Parent parent = new Parent();
parent.setUsername(email);
parent.setPassword(password);
callback.addCall(adapter.build(UsersInterface.class, params).authenticateParentAirwolf(parent)).enqueue(callback);
}
use of com.instructure.canvasapi2.models.ParentResponse in project instructure-android by instructure.
the class UserAPI method addParentAirwolf.
/**
* Add parent to Airwolf/Canvas. Currently only used in the Parent App.
* @param body
* @param callback
*/
public static void addParentAirwolf(@NonNull RestBuilder adapter, @NonNull RestParams params, @NonNull Parent body, @NonNull StatusCallback<ParentResponse> callback) {
ParentWrapper parentWrapper = new ParentWrapper();
parentWrapper.setParent(body);
callback.addCall(adapter.build(UsersInterface.class, params).addParentAirwolf(parentWrapper)).enqueue(callback);
}
use of com.instructure.canvasapi2.models.ParentResponse in project instructure-android by instructure.
the class UserManager_Test method authenticateCanvasParentAirwolf.
public static void authenticateCanvasParentAirwolf(String domain, RestBuilder adapter, RestParams params, 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);
}
Aggregations