use of com.instructure.canvasapi2.StatusCallback 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.StatusCallback 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.StatusCallback 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.StatusCallback in project instructure-android by instructure.
the class CourseNicknameManager method getCourseNickname.
public static void getCourseNickname(long courseId, StatusCallback<CourseNickname> callback, boolean forceNetwork) {
if (isTesting() || mTesting) {
CourseNicknameManager_Test.getNickname(courseId, callback);
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(false).withShouldIgnoreToken(false).withForceReadFromNetwork(forceNetwork).build();
CourseNicknameAPI.getNickname(courseId, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.StatusCallback in project instructure-android by instructure.
the class CourseNicknameManager method deleteNickname.
public static void deleteNickname(long courseId, final StatusCallback<CourseNickname> callback) {
if (isTesting() || mTesting) {
CourseNicknameManager_Test.deleteNickname(courseId, callback);
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withPerPageQueryParam(true).withShouldIgnoreToken(false).build();
CourseNicknameAPI.deleteNickname(courseId, adapter, callback, params);
}
}
Aggregations