Returns a list of announcements that the requester is permitted to view. Course students may only view PUBLISHED announcements. Course teachersand domain administrators may view all announcements.

gc_courses_announcements_list(
  courseId,
  announcementStates = NULL,
  orderBy = NULL,
  pageToken = NULL,
  pageSize = NULL
)

Arguments

courseId

Identifier of the course

announcementStates

Restriction on the state of announcements returned

orderBy

Optional sort ordering for results

pageToken

nextPageToken

pageSize

Maximum number of items to return

Details

This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to accessthe requested course or for access errors.

  • INVALID_ARGUMENT if the request is malformed.

  • NOT_FOUND if the requested course does not exist.

Authentication scopes used by this function are:

  • https://www.googleapis.com/auth/classroom.announcements

  • https://www.googleapis.com/auth/classroom.announcements.readonly

Set options(googleAuthR.scopes.selected = c("https://www.googleapis.com/auth/classroom.announcements", "https://www.googleapis.com/auth/classroom.announcements.readonly") Then run googleAuthR::gar_auth() to authenticate. See gar_auth for details.

See also