Search in sources :

Example 6 with PollChoiceResponse

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

the class PollsManager method updatePollChoice.

public static void updatePollChoice(long pollId, long pollChoiceId, String text, boolean isCorrect, int position, StatusCallback<PollChoiceResponse> callback, boolean forceNetwork) {
    if (isTesting() || mTesting) {
    // TODO:
    } else {
        final RestBuilder adapter = new RestBuilder(callback);
        final RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
        PollsChoiceAPI.updatePollChoice(pollId, pollChoiceId, text, isCorrect, position, 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)4 RestParams (com.instructure.canvasapi2.builders.RestParams)4 Bundle (android.os.Bundle)2 PollChoiceResponse (com.instructure.canvasapi2.models.PollChoiceResponse)2 PollSession (com.instructure.canvasapi2.models.PollSession)2 PollSessionResponse (com.instructure.canvasapi2.models.PollSessionResponse)2 ApiType (com.instructure.canvasapi2.utils.ApiType)2 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 ResponseBody (okhttp3.ResponseBody)2 Response (retrofit2.Response)2 Poll (com.instructure.canvasapi2.models.Poll)1 PollChoice (com.instructure.canvasapi2.models.PollChoice)1 PollResponse (com.instructure.canvasapi2.models.PollResponse)1 Section (com.instructure.canvasapi2.models.Section)1