use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class QuizManager_Test method getQuiz.
public static void getQuiz(StatusCallback<Quiz> callback) {
Response httpResponse = new Response.Builder().request(new Request.Builder().url("https://test.com").build()).code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
Quiz quiz = new Quiz();
quiz.setTitle("TEST");
quiz.setDescription("description");
retrofit2.Response<Quiz> response = retrofit2.Response.success(new Quiz(), httpResponse);
callback.onResponse(response, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class SubmissionManager_Test method getStudentSubmissionsForCourse.
public static void getStudentSubmissionsForCourse(long studentId, long courseId, StatusCallback<List<Submission>> callback) {
// TODO:
Response response = new Response.Builder().request(new Request.Builder().url("https://test.com").build()).code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
List<Submission> submissions = new ArrayList<>();
retrofit2.Response<List<Submission>> response1 = retrofit2.Response.success(submissions, response);
callback.onResponse(response1, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class UserManager_Test method getColors.
public static void getColors(@NonNull RestBuilder adapter, @NonNull StatusCallback<CanvasColor> callback, @NonNull RestParams params) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
CanvasColor canvasColor = new CanvasColor();
retrofit2.Response<CanvasColor> response1 = retrofit2.Response.success(canvasColor, response);
callback.onResponse(response1, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class UserManager_Test method resetParentPassword.
public static void resetParentPassword(String airwolfDomain, RestBuilder adapter, RestParams params, String email, String password, StatusCallback<ResetParent> 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.Message 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