edu.ksu.canvas.interfaces.SubmissionReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of canvas-api Show documentation
Show all versions of canvas-api Show documentation
A native Java library to talk to the Canvas REST API
The newest version!
package edu.ksu.canvas.interfaces;
import edu.ksu.canvas.model.assignment.Submission;
import edu.ksu.canvas.requestOptions.GetSubmissionsOptions;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
public interface SubmissionReader extends CanvasReader {
/**
* Retrieve a list of assignment submissions from a course
*
* @param options Options class containing required and optional parameters for this API call
* @return List of assignment submissions in the course with the course ID
* @throws IOException When there is an error communicating with Canvas
*/
List getCourseSubmissions(GetSubmissionsOptions options) throws IOException;
/**
* Return a list of all assignment submissions for a course (either for a single user,
* or all users).
*
* @param options Options class containing required and optional parameters for this API call
* @return List of assignment submissions in the course with the course ID
* @throws IOException When there is an error communicating with Canvas
*/
List listCourseSubmissionsForMultipleAssignments(GetSubmissionsOptions options) throws IOException;
/**
* Retrieve a list of assignment submissions from a section
*
* @param options Options class containing required and optional parameters for this API call
* @return List of assignment submissions in the section with the section ID
* @throws IOException When there is an error communicating with Canvas
*/
List getSectionSubmissions(GetSubmissionsOptions options) throws IOException;
/**
* Retrieve a single assignment submission from a course
* @param options Options class containing required and optional parameters for this API call
* @return The requested Submission object given the course, assignment and user
* @throws IOException When there is an error communicating with Canvas
*/
Optional getSingleCourseSubmission(GetSubmissionsOptions options) throws IOException;
/**
* Retrieve a single assignment submission from a section
* @param options Options class containing required and optional parameters for this API call
* @return The requested Submission object given the section, assignment and user
* @throws IOException When there is an error communicating with Canvas
*/
Optional getSingleSectionSubmission(GetSubmissionsOptions options) throws IOException;
}