use of com.instructure.canvasapi2.builders.RestBuilder 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.builders.RestBuilder 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.builders.RestBuilder 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);
}
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class PollsManager method getFirstPagePollChoices.
public static void getFirstPagePollChoices(long pollId, 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.getFirstPagePollChoices(pollId, adapter, params, callback);
}
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class PollsManager method createPollChoice.
public static void createPollChoice(long pollId, 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.createPollChoice(pollId, text, isCorrect, position, adapter, params, callback);
}
}
Aggregations