use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class PollsManager method deletePoll.
public static void deletePoll(long pollId, StatusCallback<ResponseBody> 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.deletePoll(pollId, adapter, params, callback);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class PollsManager method getFirstPagePolls.
public static void getFirstPagePolls(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.getFirstPagePolls(adapter, params, callback);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class PollsManager method getOpenSessions.
public static void getOpenSessions(StatusCallback<PollSessionResponse> 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();
PollsSessionAPI.getOpenSessions(adapter, params, callback);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class PollsManager method getSinglePollSession.
public static void getSinglePollSession(long pollId, long pollSessionId, StatusCallback<PollSessionResponse> 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();
PollsSessionAPI.getSinglePollSession(pollId, pollSessionId, adapter, params, callback);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class PollsManager method getNextPagePollChoices.
public static void getNextPagePollChoices(String nextUrl, 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.getNextPagePollChoices(nextUrl, adapter, params, callback);
}
}
Aggregations