use of com.instructure.canvasapi2.models.QuizQuestion in project instructure-android by instructure.
the class QuizManager_Test method getQuizQuestions.
public static void getQuizQuestions(long courseId, long quizId, StatusCallback<List<QuizQuestion>> callback) {
// TODO:
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();
List<QuizQuestion> quizQuestions = new ArrayList<>();
retrofit2.Response<List<QuizQuestion>> response1 = retrofit2.Response.success(quizQuestions, response);
callback.onResponse(response1, new LinkHeaders(), ApiType.CACHE);
}
use of com.instructure.canvasapi2.models.QuizQuestion in project instructure-android by instructure.
the class QuizManager method getQuizQuestions.
public static void getQuizQuestions(long courseId, long quizId, StatusCallback<List<QuizQuestion>> callback) {
if (isTesting() || mTesting) {
QuizManager_Test.getQuizQuestions(courseId, quizId, callback);
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).build();
QuizAPI.getQuizQuestions(courseId, quizId, adapter, callback, params);
}
}
Aggregations