All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.ksu.canvas.interfaces.AssignmentReader Maven / Gradle / Ivy

The newest version!
package edu.ksu.canvas.interfaces;

import edu.ksu.canvas.model.assignment.Assignment;
import edu.ksu.canvas.requestOptions.GetSingleAssignmentOptions;
import edu.ksu.canvas.requestOptions.ListCourseAssignmentsOptions;
import edu.ksu.canvas.requestOptions.ListUserAssignmentOptions;

import java.io.IOException;
import java.util.List;
import java.util.Optional;

/**
 * Methods to read information from and about Assignments
 */
public interface AssignmentReader extends CanvasReader {
    /**
     * Retrieve a specific assignment from Canvas by its Canvas ID number
     * @param options Options class containing required and optional parameters for this API call
     * @return The assignment returned by Canvas or an empty Optional
     * @throws IOException When there is an error communicating with Canvas
     */
    Optional getSingleAssignment(GetSingleAssignmentOptions options) throws IOException;

    /**
     * Retrieve a list of assignments associated with a course
     * @param options Options class containing required and optional parameters for this API call
     * @return List of assignments in the requested course
     * @throws IOException When there is an error communicating with Canvas
     */
    List listCourseAssignments(ListCourseAssignmentsOptions options) throws IOException;

    /**
     * Retrieve a list of assignments associated with the given user/course combination
     * @param options Options class containing required and optional parameters for this API call
     * @return List of assignments for the user/course combination
     * @throws IOException When there is an error communicating with Canvas
     */
    List listUserAssignments(ListUserAssignmentOptions options) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy