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

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

The newest version!
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;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy