use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class CourseManager method getCourseWithGradeAirwolf.
// region Airwolf
public static void getCourseWithGradeAirwolf(String airwolfDomain, String parentId, String studentId, long courseId, StatusCallback<Course> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).withDomain(airwolfDomain).withAPIVersion("").build();
CourseAPI.getCourseWithGradeAirwolf(parentId, studentId, courseId, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class CourseManager method getCourseWithSyllabusAirwolf.
public static void getCourseWithSyllabusAirwolf(String airwolfDomain, String parentId, String studentId, long courseId, StatusCallback<Course> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).withDomain(airwolfDomain).withAPIVersion("").build();
CourseAPI.getCourseWithSyllabusAirwolf(parentId, studentId, courseId, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class CourseManager method editCourseName.
public static void editCourseName(long courseId, String newCourseName, StatusCallback<Course> callback, boolean forceNetwork) {
if (isTesting() || mTesting) {
// TODO:
// CourseManager_Test.editCourseName(courseId, callback);
} else {
Map<String, String> queryParams = new HashMap<>();
queryParams.put("course[name]", newCourseName);
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
CourseAPI.updateCourse(courseId, queryParams, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class DiscussionManager method getAllDiscussionTopicHeaders.
public static void getAllDiscussionTopicHeaders(@NonNull CanvasContext canvasContext, final boolean forceNetwork, StatusCallback<List<DiscussionTopicHeader>> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
final RestBuilder adapter = new RestBuilder(callback);
final RestParams params = new RestParams.Builder().withForceReadFromNetwork(forceNetwork).withPerPageQueryParam(true).build();
StatusCallback<List<DiscussionTopicHeader>> depaginatedCallback = new ExhaustiveListCallback<DiscussionTopicHeader>(callback) {
@Override
public void getNextPage(@NotNull StatusCallback<List<DiscussionTopicHeader>> callback, @NotNull String nextUrl, boolean isCached) {
DiscussionAPI.getNextPage(nextUrl, adapter, callback, params);
}
};
adapter.setStatusCallback(depaginatedCallback);
DiscussionAPI.getFirstPageDiscussionTopicHeaders(canvasContext, adapter, depaginatedCallback, params);
}
}
use of com.instructure.canvasapi2.models.ToDo in project instructure-android by instructure.
the class DiscussionManager method getDiscussions.
public static void getDiscussions(final boolean forceNetwork, CanvasContext canvasContext, StatusCallback<List<DiscussionTopicHeader>> callback) {
if (isTesting() || mTesting) {
// TODO:
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withForceReadFromNetwork(forceNetwork).withPerPageQueryParam(true).build();
DiscussionAPI.getDiscussions(canvasContext, adapter, callback, params);
}
}
Aggregations