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.
- edit(**kwargs)
Update the title or the contents of a specified wiki page.
- Calls:
- Return type:
- get_parent(**kwargs)
Return the object that spawned this page.
- Calls:
- Return type:
- 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.PageRevisionor 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:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.pagerevision.PageRevision
- property parent_id
Return the id of the course or group that spawned this page.
- Return type:
int
- property 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.PageRevisionor 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:
- Return type:
canvasapi.pagerevision.PageRevision
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:
- property parent_id
Return the id of the course or group that spawned this page.
- Return type:
int
- property parent_type
Return whether the page was spawned from a course or group.
- Return type:
str