edu.ksu.canvas.interfaces.AccountReportWriter Maven / Gradle / Ivy
Show all versions of canvas-api Show documentation
package edu.ksu.canvas.interfaces;
import java.io.IOException;
import java.util.Optional;
import edu.ksu.canvas.model.report.AccountReport;
import edu.ksu.canvas.requestOptions.AccountReportOptions;
public interface AccountReportWriter extends CanvasWriter {
/**
* Start a new report, specifying a set of options to run with.
*
* Note that the options used vary depending on the report you wish to start.
* @param options options that should be passed to start the report
* @return an Optional<AccountReport>
which contains a reference to the generated report
* @throws IOException When there is an error communicating with Canvas
* @see Account Report API documentation
* @see AccountReportOptions
*/
Optional startReport(AccountReportOptions options) throws IOException;
/**
* Delete a report. This can also be used to stop the run of a report.
* @param accountId the account id used to generate the report
* @param report the name of the report
* @param reportId the ID of the report
* @return an Optional<AccountReport>
which contains a reference to the deleted report
* @throws IOException When there is an error communicating with Canvas
* @see Account Report API documentation
*/
Optional deleteReport(String accountId, String report, Integer reportId) throws IOException;
}