DiscussionTopic
- class canvasapi.discussion_topic.DiscussionTopic(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- delete(**kwargs)
Deletes the discussion topic. This will also delete the assignment.
- Calls:
DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id
or DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id
- Returns:
True if the discussion topic was deleted, False otherwise.
- Return type:
bool
- get_entries(ids, **kwargs)
Retrieve a paginated list of discussion entries, given a list of ids. Entries will be returned in id order, smallest id first.
- Calls:
GET /api/v1/courses/:course_id/discussion_topics/:topic_id/entry_list
or GET /api/v1/groups/:group_id/discussion_topics/:topic_id/entry_list
- Parameters:
ids (
canvasapi.discussion_topic.DiscussionEntry, or list or tuple of int) – A list of entry objects or IDs to retrieve.- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.discussion_topic.DiscussionEntry
- get_parent(**kwargs)
Return the object that spawned this discussion topic.
- Return type:
- get_topic_entries(**kwargs)
Retreive the top-level entries in a discussion topic.
- mark_as_read(**kwargs)
Mark the initial text of the discussion topic as read.
- mark_as_unread(**kwargs)
Mark the initial text of the discussion topic as unread.
- mark_entries_as_read(**kwargs)
Mark the discussion topic and all its entries as read.
- mark_entries_as_unread(**kwargs)
Mark the discussion topic and all its entries as unread.
- post_entry(**kwargs)
Creates a new entry in a discussion topic.
- subscribe(**kwargs)
Subscribe to a topic to receive notifications about new entries.
- unsubscribe(**kwargs)
Unsubscribe from a topic to stop receiving notifications about new entries.
- update(**kwargs)
Updates an existing discussion topic for the course or group.