edu.ksu.canvas.interfaces.CalendarWriter 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
package edu.ksu.canvas.interfaces;
import edu.ksu.canvas.model.CalendarEvent;
import edu.ksu.canvas.requestOptions.DeleteCalendarEventOptions;
import java.io.IOException;
import java.util.Optional;
/**
* Methods to manipulate calendar events in Canvas.
* @see Canvas calendar event documentation
*
*/
public interface CalendarWriter extends CanvasWriter {
/**
* Delete a calendar event from Canvas.
* @param options Options class containing required and optional parameters for the delete action
* @return The deleted calendar event
* @throws IOException When there is an error communicating with Canvas
*/
Optional deleteCalendarEvent(DeleteCalendarEventOptions options) throws IOException;
/**
* Create a new calendar event in Canvas.
* @param calendarEvent Calendar event object to persist to Canvas. Context code is required.
* @return The newly created calendar event
* @throws IOException When there is an error communicating with Canvas
*/
Optional createCalendarEvent(CalendarEvent calendarEvent) throws IOException;
/**
* Modify a calendar event in Canvas.
* @param calendarEvent An existing calendar event to modify
* @return The updated calendar event
* @throws IOException When there is an error communicating with Canvas
*/
Optional editCalendarEvent(CalendarEvent calendarEvent) throws IOException;
}