.course. announcement

Source:
Functions for interacting with course announcements

Methods

(async) create(opts, configopt) → {Promise.<CanvasDiscussionTopic>}

Source:
Author:
  • Gabe Abrams
Create an announcement
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
title string the title of the announcement
message string the message of the announcement
courseId number <optional>
default course id Canvas course Id
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasDiscussionTopic>

(async) list(opts, configopt) → {Promise.<Array.<CanvasDiscussionTopic>>}

Source:
Author:
  • Gabe Abrams
Gets the list of announcements in a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
courseId number Canvas course Id to query
onlyIncludeActive boolean <optional>
if true, only include active announcements
startDate Date <optional>
two weeks ago the start date for the query
endDate Date <optional>
28 days from start date the end date for the query
queryLastSixMonths boolean <optional>
if true, overwrites the start date with 6 months ago and end date to now
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<Array.<CanvasDiscussionTopic>>