Skip to content

page

Accessed as client.repos.wiki.page; the async client mirrors it.

ReposWikiPage

The repos.wiki.page namespace.

delete

delete(owner: str, repo: str, page_name: str) -> None

Delete a wiki page.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
page_name str

name of the page

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
LockedError
  1. APIRepoArchivedError is an error that is raised when an archived repo should be modified.

Operation ID: repoDeleteWikiPage

get

get(owner: str, repo: str, page_name: str) -> WikiPage

Get a wiki page.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
page_name str

name of the page

required

Returns:

Type Description
WikiPage

WikiPage.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: repoGetWikiPage

update

update(
    owner: str,
    repo: str,
    page_name: str,
    *,
    content_base64: str | None = None,
    message: str | None = None,
    title: str | None = None,
) -> WikiPage

Edit a wiki page.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
page_name str

name of the page

required
content_base64 str | None

content must be base64 encoded

None
message str | None

optional commit message summarizing the change

None
title str | None

page title. leave empty to keep unchanged

None

Returns:

Type Description
WikiPage

WikiPage.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
PayloadTooLargeError
  1. QuotaExceeded.
LockedError
  1. APIRepoArchivedError is an error that is raised when an archived repo should be modified.

Operation ID: repoEditWikiPage

AsyncReposWikiPage

The repos.wiki.page namespace.

delete

delete(owner: str, repo: str, page_name: str) -> None

Delete a wiki page.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
page_name str

name of the page

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
LockedError
  1. APIRepoArchivedError is an error that is raised when an archived repo should be modified.

Operation ID: repoDeleteWikiPage

get

get(owner: str, repo: str, page_name: str) -> WikiPage

Get a wiki page.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
page_name str

name of the page

required

Returns:

Type Description
WikiPage

WikiPage.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: repoGetWikiPage

update

update(
    owner: str,
    repo: str,
    page_name: str,
    *,
    content_base64: str | None = None,
    message: str | None = None,
    title: str | None = None,
) -> WikiPage

Edit a wiki page.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
page_name str

name of the page

required
content_base64 str | None

content must be base64 encoded

None
message str | None

optional commit message summarizing the change

None
title str | None

page title. leave empty to keep unchanged

None

Returns:

Type Description
WikiPage

WikiPage.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
PayloadTooLargeError
  1. QuotaExceeded.
LockedError
  1. APIRepoArchivedError is an error that is raised when an archived repo should be modified.

Operation ID: repoEditWikiPage