Skip to main content
Module

x/gesso/types/params.ts>ListAnnouncementsParams

A TypeScript API client for Canvas LMS
Latest
interface ListAnnouncementsParams
import { type ListAnnouncementsParams } from "https://deno.land/x/gesso@v0.1.2/types/params.ts";

Properties

optional
context_codes: string[]

List of context_codes to retrieve announcements for (for example, course_123). Only courses are presently supported. The call will fail unless the caller has View Announcements permission in all listed courses.

optional
startdate: Date

Only return announcements posted since the start_date (inclusive). Defaults to 14 days ago. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM- DDTHH:MM:SSZ.

optional
enddate: Date

Only return announcements posted before the end_date (inclusive). Defaults to 28 days from start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. Announcements scheduled for future posting will only be returned to course administrators.

optional
activeonly: boolean

Only return active announcements that have been published. Applies only to requesting users that have permission to view unpublished items. Defaults to false for users with access to view unpublished items, otherwise true and unmodifiable.

optional
latestonly: boolean

Only return the latest announcement for each associated context. The response will include at most one announcement for each specified context in the context_codes[] parameter. Defaults to false.

optional
include: unknown[]

Optional list of resources to include with the response. May include a string of the name of the resource. Possible values are: “sections”, “sections_user_count” if “sections” is passed, includes the course sections that are associated with the topic, if the topic is specific to certain sections of the course. If “sections_user_count” is passed, then: (a) If sections were asked forand* the topic is specific to certain course sections sections, includes the number of users in each section. (as part of the section json asked for above) (b) Else, includes at the root level the total number of users in the topic's context (group or course) that the topic applies to.