edu.ksu.canvas.interfaces.CourseWriter Maven / Gradle / Ivy
package edu.ksu.canvas.interfaces;
import edu.ksu.canvas.model.Course;
import edu.ksu.canvas.model.Deposit;
import edu.ksu.canvas.model.Progress;
import edu.ksu.canvas.requestOptions.DeleteCourseOptions;
import edu.ksu.canvas.requestOptions.UpdateCoursesOptions;
import edu.ksu.canvas.requestOptions.UploadOptions;
import java.io.IOException;
import java.util.Optional;
public interface CourseWriter extends CanvasWriter {
/**
* Create a new course in Canvas
* @param accountId the account ID of the account under which to place this course
* @param course A course object containing the information needed to create a course in Canvas
* @return The newly created course
* @throws IOException When there is an error communicating with Canvas
*/
Optional createCourse(String accountId, Course course) throws IOException;
/**
* Update a course in Canvas
* @param course A course object containing the information needed to update a course in Canvas
* @return The newly updated course
* @throws IOException When there is an error communicating with Canvas
*/
Optional updateCourse(Course course) throws IOException;
/**
* Update a course in Canvas
* @param id The ID of the course to update, this is useful when you want to update a course
* by it's SIS ID, for example with "sis_course_id:id-123"
* @param course A course object containing the information needed to update a course in Canvas
* @return The newly updated course
* @throws IOException When there is an error communicating with Canvas
*/
Optional updateCourse(String id, Course course) throws IOException;
/**
* Update multiple courses in an account. Operates asynchronously
* @param accountId The ID of the account with the courses to update
* @param updateCoursesOptions (specifying the course IDs and the event type)
* @return The progress object created by Canvas
* @throws IOException When there is an error communicating with Canvas
*/
Optional