Page¶
-
class
canvasapi.page.
Page
(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)¶ Delete this page.
Calls: DELETE /api/v1/courses/:course_id/pages/:url or DELETE /api/v1/groups/:group_id/pages/:url Return type: canvasapi.page.Page
-
edit
(**kwargs)¶ Update the title or the contents of a specified wiki page.
Calls: PUT /api/v1/courses/:course_id/pages/:url Return type: canvasapi.page.Page
-
get_parent
(**kwargs)¶ Return the object that spawned this page.
Calls: GET /api/v1/groups/:group_id or GET /api/v1/courses/:id Return type: canvasapi.group.Group
orcanvasapi.course.Course
-
get_revision_by_id
(revision, **kwargs)¶ Retrieve the contents of the revision by the id.
Calls: GET /api/v1/courses/:course_id/pages/:url/revisions/:revision_id Parameters: revision ( canvasapi.pagerevision.PageRevision
or int) – The object or ID of a specified revision.Returns: Contents of the page revision. Return type: canvasapi.pagerevision.PageRevision
-
get_revisions
(**kwargs)¶ List the revisions of a page.
Calls: GET /api/v1/courses/:course_id/pages/:url/revisions Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.pagerevision.PageRevision
-
parent_id
¶ Return the id of the course or group that spawned this page.
Return type: int
-
parent_type
¶ Return whether the page was spawned from a course or group.
Return type: str
-
revert_to_revision
(revision, **kwargs)¶ Revert the page back to a specified revision.
Calls: POST /api/v1/courses/:course_id/pages/:url/revisions/:revision_id Parameters: revision ( canvasapi.pagerevision.PageRevision
or int) – The object or ID of a specified revision.Returns: Contents of the page revision. Return type: canvasapi.pagerevision.PageRevision
-
show_latest_revision
(**kwargs)¶ Retrieve the contents of the latest revision.
Calls: GET /api/v1/courses/:course_id/pages/:url/revisions/latest Return type: canvasapi.pagerevision.PageRevision
- requester (
PageRevision¶
-
class
canvasapi.page.
PageRevision
(requester, attributes)¶ Parameters: - requester (
canvasapi.requester.Requester
) – The requester to pass HTTP requests through. - attributes (dict) – The JSON object to build this object with.
-
get_parent
(**kwargs)¶ Return the object that spawned this page.
Calls: GET /api/v1/groups/:group_id or :calls: GET /api/v1/courses/:id Return type: canvasapi.group.Group
orcanvasapi.course.Course
-
parent_id
¶ Return the id of the course or group that spawned this page.
Return type: int
-
parent_type
¶ Return whether the page was spawned from a course or group.
Return type: str
- requester (