Search in sources :

Example 6 with PollResponse

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

the class PollsManager method createPoll.

public static void createPoll(String title, StatusCallback<PollResponse> 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();
        PollsAPI.createPoll(title, 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)5 RestParams (com.instructure.canvasapi2.builders.RestParams)5 Bundle (android.os.Bundle)1 Poll (com.instructure.canvasapi2.models.Poll)1 PollChoiceResponse (com.instructure.canvasapi2.models.PollChoiceResponse)1 PollResponse (com.instructure.canvasapi2.models.PollResponse)1 PollSession (com.instructure.canvasapi2.models.PollSession)1 PollSessionResponse (com.instructure.canvasapi2.models.PollSessionResponse)1 ApiType (com.instructure.canvasapi2.utils.ApiType)1 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ResponseBody (okhttp3.ResponseBody)1 Response (retrofit2.Response)1