Search in sources :

Example 16 with Quiz

use of com.instructure.canvasapi2.models.Quiz in project instructure-android by instructure.

the class QuizManager method getNextPageQuizList.

public static void getNextPageQuizList(String nextPage, final boolean forceNetwork, final StatusCallback<List<Quiz>> callback) {
    final RestBuilder adapter = new RestBuilder(callback);
    final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
    QuizAPI.getNextPageQuizList(nextPage, adapter, params, callback);
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Example 17 with Quiz

use of com.instructure.canvasapi2.models.Quiz in project instructure-android by instructure.

the class QuizManager method getDetailedQuizByUrl.

public static void getDetailedQuizByUrl(String quizUrl, final boolean forceNetwork, final StatusCallback<Quiz> callback) {
    final RestBuilder adapter = new RestBuilder(callback);
    final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
    QuizAPI.getDetailedQuizByUrl(quizUrl, adapter, params, callback);
}
Also used : RestParams(com.instructure.canvasapi2.builders.RestParams) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder) RestBuilder(com.instructure.canvasapi2.builders.RestBuilder)

Aggregations

RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)10 RestParams (com.instructure.canvasapi2.builders.RestParams)9 Quiz (com.instructure.canvasapi2.models.Quiz)5 QuizSubmissionResponse (com.instructure.canvasapi2.models.QuizSubmissionResponse)4 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)4 QuizSubmissionQuestionResponse (com.instructure.canvasapi2.models.QuizSubmissionQuestionResponse)3 ArrayList (java.util.ArrayList)3 Response (okhttp3.Response)3 Bundle (android.os.Bundle)2 NonNull (android.support.annotation.NonNull)2 StatusCallback (com.instructure.canvasapi2.StatusCallback)2 Course (com.instructure.canvasapi2.models.Course)2 List (java.util.List)2 Request (okhttp3.Request)2 Intent (android.content.Intent)1 Paint (android.graphics.Paint)1 AlertDialog (android.support.v7.app.AlertDialog)1 KeyEvent (android.view.KeyEvent)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1