public class CalendarEventImpl extends BaseImpl<CalendarEvent,CalendarReader,CalendarWriter> implements CalendarReader, CalendarWriter
apiVersion, canvasBaseUrl, canvasMessenger, masqueradeAs, masqueradeType, oauthToken, paginationPageSize, responseCallback, responseParser, serializeNulls| Constructor and Description |
|---|
CalendarEventImpl(String canvasBaseUrl,
Integer apiVersion,
OauthToken oauthToken,
RestClient restClient,
int connectTimeout,
int readTimeout,
Integer paginationPageSize,
Boolean serializeNulls)
Construct a new CanvasApi class with an OAuth token
|
| Modifier and Type | Method and Description |
|---|---|
Optional<CalendarEvent> |
createCalendarEvent(CalendarEvent calendarEvent)
Create a new calendar event in Canvas.
|
Optional<CalendarEvent> |
deleteCalendarEvent(DeleteCalendarEventOptions options)
Delete a calendar event from Canvas.
|
Optional<CalendarEvent> |
editCalendarEvent(CalendarEvent calendarEvent)
Modify a calendar event in Canvas.
|
Optional<CalendarEvent> |
getCalendarEvent(Integer id)
Retrieve a specific calendar event from Canvas.
|
List<CalendarEvent> |
listCalendarEvents(String userId,
ListCalendarEventsOptions options)
Retrieve calendar events for a specified user.
|
List<CalendarEvent> |
listCurrentUserCalendarEvents(ListCalendarEventsOptions options)
Retrieve calendar events for the current user.
|
protected Type |
listType() |
protected Class<CalendarEvent> |
objectType() |
buildCanvasUrl, encode, getFromCanvas, getListFromCanvas, parseListOfResponses, readAsCanvasUser, readAsSisUser, withCallback, writeAsCanvasUser, writeAsSisUserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadAsCanvasUser, readAsSisUser, withCallbackwriteAsCanvasUser, writeAsSisUserpublic CalendarEventImpl(String canvasBaseUrl, Integer apiVersion, OauthToken oauthToken, RestClient restClient, int connectTimeout, int readTimeout, Integer paginationPageSize, Boolean serializeNulls)
canvasBaseUrl - The base URL of your canvas instanceapiVersion - The version of the Canvas API (currently 1)oauthToken - OAuth token to use when executing API callsrestClient - a RestClient implementation to use when talking to CanvasconnectTimeout - Timeout in seconds to use when connectingreadTimeout - Timeout in seconds to use when waiting for data to come back from an open connectionpaginationPageSize - How many objects to request per page on paginated requestsserializeNulls - Whether to serialize null values out to Canvas, blanking them outprotected Type listType()
listType in class BaseImpl<CalendarEvent,CalendarReader,CalendarWriter>protected Class<CalendarEvent> objectType()
objectType in class BaseImpl<CalendarEvent,CalendarReader,CalendarWriter>public List<CalendarEvent> listCurrentUserCalendarEvents(ListCalendarEventsOptions options) throws IOException
CalendarReaderlistCurrentUserCalendarEvents in interface CalendarReaderoptions - Options class to capture optional parameters to this API callIOException - When there is an error communicating with Canvaspublic List<CalendarEvent> listCalendarEvents(String userId, ListCalendarEventsOptions options) throws IOException
CalendarReaderlistCalendarEvents in interface CalendarReaderuserId - Canvas ID or sis_user_id:xxx of the user to queryoptions - Additional options to modify the calendar queryIOException - When there is an error communicating with Canvaspublic Optional<CalendarEvent> getCalendarEvent(Integer id) throws IOException
CalendarReadergetCalendarEvent in interface CalendarReaderid - Canvas ID of the calendar eventIOException - When there is an error communicating with Canvaspublic Optional<CalendarEvent> deleteCalendarEvent(DeleteCalendarEventOptions options) throws IOException
CalendarWriterdeleteCalendarEvent in interface CalendarWriteroptions - Options class containing required and optional parameters for the delete actionIOException - When there is an error communicating with Canvaspublic Optional<CalendarEvent> createCalendarEvent(CalendarEvent calendarEvent) throws IOException
CalendarWritercreateCalendarEvent in interface CalendarWritercalendarEvent - Calendar event object to persist to Canvas. Context code is required.IOException - When there is an error communicating with Canvaspublic Optional<CalendarEvent> editCalendarEvent(CalendarEvent calendarEvent) throws IOException
CalendarWritereditCalendarEvent in interface CalendarWritercalendarEvent - An existing calendar event to modifyIOException - When there is an error communicating with CanvasCopyright © 2021 Kansas State University, Office of Mediated Education. All rights reserved.