use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class PollsManager method updatePoll.
public static void updatePoll(long pollId, 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.updatePoll(pollId, title, adapter, params, callback);
}
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class PollsManager method getSinglePoll.
public static void getSinglePoll(long pollId, 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.getSinglePoll(pollId, adapter, params, callback);
}
}
use of com.instructure.canvasapi2.builders.RestBuilder in project instructure-android by instructure.
the class PollsManager method openPollSession.
public static void openPollSession(long pollId, long sectionId, 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();
PollsSessionAPI.openPollSession(pollId, sectionId, adapter, params, callback);
}
}
use of com.instructure.canvasapi2.builders.RestBuilder 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.builders.RestBuilder 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);
}
}
Aggregations