pub struct WikiCategoriesPagesResource<'a> { /* private fields */ }Expand description
client.wiki().categories().pages()
Implementations§
Source§impl<'a> WikiCategoriesPagesResource<'a>
impl<'a> WikiCategoriesPagesResource<'a>
pub fn versions(&self) -> WikiCategoriesPagesVersionsResource<'a>
Sourcepub fn create(
&self,
wiki_category_id: impl Display,
body: &WikiPageCreate,
) -> Result<WikiPage>
pub fn create( &self, wiki_category_id: impl Display, body: &WikiPageCreate, ) -> Result<WikiPage>
Create a wiki page
POST /wiki/categories/{wikiCategoryId}/pages
Creates a page with a generated stable GUID and version 1. Requires churchwiki edit category; creating a title that resolves to a protected system page additionally requires a super administrator. The trimmed title must be unique in the category across stored versions. Unicode ellipsis is normalized to three periods. Omitted text is stored as null but returned as an empty string. isMarkdown and onStartpage default to false; this differs from the main page automatically created with a new category, which starts with Markdown enabled.
§Example
let body = models::WikiPageCreate {
title: "My new wiki page".into(),
..Default::default()
};
let result = client.wiki().categories().pages().create(42, &body)?;
println!("{}", result.title);Sourcepub fn delete(
&self,
wiki_category_id: impl Display,
identifier: impl Display,
) -> Result<()>
pub fn delete( &self, wiki_category_id: impl Display, identifier: impl Display, ) -> Result<()>
Delete a wiki page
DELETE /wiki/categories/{wikiCategoryId}/pages/{identifier}
Deletes the page identified by GUID and every stored revision. Requires churchwiki edit category. Protected system pages in category 0 cannot be deleted through this endpoint, including by super administrators. Missing pages succeed with 204. Latest redirect pages targeting the deleted title have redirectTo cleared; older redirect revisions are retained. This deletion has no dry-run or version precondition.
§Example
client.wiki().categories().pages().delete(42, "681F54E3-2EB7-40A4-84F0-EFF8E8F05727")?;Sourcepub fn get(
&self,
wiki_category_id: impl Display,
identifier: impl Display,
) -> Result<WikiPage>
pub fn get( &self, wiki_category_id: impl Display, identifier: impl Display, ) -> Result<WikiPage>
Get a wiki page
GET /wiki/categories/{wikiCategoryId}/pages/{identifier}
Requires churchwiki view category permission, including any permissions assigned to guests. For a protected system page in category 0, super-administrator access also permits the individual read. Returns one page revision with text: Markdown is returned as stored, legacy HTML is sanitized, and null content becomes an empty string. Prefer the stable page GUID; legacy titles are accepted and Unicode ellipsis characters in titles are normalized to three periods. A version value of 0 behaves like omission and selects the latest revision; other nonzero values select that exact revision. Redirect pages are returned as data with redirectTo rather than followed.
Use Self::get_with to pass query parameters.
§Example
let page = client.wiki().categories().pages().get(42, "main")?;
println!("{}", page.title);Sourcepub fn get_with(
&self,
wiki_category_id: impl Display,
identifier: impl Display,
query: &GetWikiCategoriesIdPagesIdentifierQuery,
) -> Result<WikiPage>
pub fn get_with( &self, wiki_category_id: impl Display, identifier: impl Display, query: &GetWikiCategoriesIdPagesIdentifierQuery, ) -> Result<WikiPage>
Get a wiki page
Like Self::get, with query parameters.
GET /wiki/categories/{wikiCategoryId}/pages/{identifier}
Requires churchwiki view category permission, including any permissions assigned to guests. For a protected system page in category 0, super-administrator access also permits the individual read. Returns one page revision with text: Markdown is returned as stored, legacy HTML is sanitized, and null content becomes an empty string. Prefer the stable page GUID; legacy titles are accepted and Unicode ellipsis characters in titles are normalized to three periods. A version value of 0 behaves like omission and selects the latest revision; other nonzero values select that exact revision. Redirect pages are returned as data with redirectTo rather than followed.
Sourcepub fn list(
&self,
wiki_category_id: impl Display,
) -> Result<Vec<SimpleWikiPage>>
pub fn list( &self, wiki_category_id: impl Display, ) -> Result<Vec<SimpleWikiPage>>
List wiki pages in a category
GET /wiki/categories/{wikiCategoryId}/pages
Lists the latest version of each non-system page in this category, including redirect pages. Requires churchwiki view category permission. Page text and previews are omitted. Results are ordered by display title (main uses the category name), then GUID, without pagination; meta.count is the number of returned pages. The nested wikiCategory.permissions object is normally empty, while page.permissions contains canEdit/canDelete.
§Example
for page in client.wiki().categories().pages().list(42)? {
println!("{}", page.title);
}Sourcepub fn patch(
&self,
wiki_category_id: impl Display,
identifier: impl Display,
body: &WikiPageUpdate,
) -> Result<WikiPage>
pub fn patch( &self, wiki_category_id: impl Display, identifier: impl Display, body: &WikiPageUpdate, ) -> Result<WikiPage>
Update a wiki page
PATCH /wiki/categories/{wikiCategoryId}/pages/{identifier}
Updates only supplied text, isMarkdown and onStartpage fields on the latest revision identified by GUID. Titles cannot be changed through this endpoint. Requires category edit permission; protected system pages in category 0 require a super administrator. Changed text creates the next revision with the same GUID; unchanged text or changes only to the flags modify the existing latest revision. Trimmed blank/null text clears the stored content. No expected-version or ETag precondition is accepted, so this endpoint does not provide optimistic edit-conflict protection.
§Example
let body = models::WikiPageUpdate {
is_markdown: Some(true),
..Default::default()
};
let result = client.wiki().categories().pages().patch(42, "681F54E3-2EB7-40A4-84F0-EFF8E8F05727", &body)?;
println!("{}", result.title);