pub struct ConfluenceApi { /* private fields */ }Expand description
Confluence Cloud REST API v2 backend.
Implementations§
Source§impl ConfluenceApi
impl ConfluenceApi
Sourcepub fn new(client: AtlassianClient) -> Self
pub fn new(client: AtlassianClient) -> Self
Creates a new Confluence API backend.
Source§impl ConfluenceApi
impl ConfluenceApi
Sourcepub async fn resolve_space_id(&self, space_key: &str) -> Result<String>
pub async fn resolve_space_id(&self, space_key: &str) -> Result<String>
Resolves a space key to a space ID via the Confluence API.
Sourcepub async fn create_page(
&self,
space_key: &str,
title: &str,
body_adf: &AdfDocument,
parent_id: Option<&str>,
) -> Result<String>
pub async fn create_page( &self, space_key: &str, title: &str, body_adf: &AdfDocument, parent_id: Option<&str>, ) -> Result<String>
Creates a new Confluence page.
Sourcepub async fn delete_page(&self, id: &str, purge: bool) -> Result<()>
pub async fn delete_page(&self, id: &str, purge: bool) -> Result<()>
Deletes a Confluence page.
Sourcepub async fn get_children(&self, page_id: &str) -> Result<Vec<ChildPage>>
pub async fn get_children(&self, page_id: &str) -> Result<Vec<ChildPage>>
Fetches all child pages of a given page, handling pagination.
Uses the v1 content API (/wiki/rest/api/content/{id}/child/page)
which is more widely supported than the v2 children endpoint.
Sourcepub async fn get_space_root_pages(
&self,
space_id: &str,
) -> Result<Vec<ChildPage>>
pub async fn get_space_root_pages( &self, space_id: &str, ) -> Result<Vec<ChildPage>>
Fetches top-level pages in a space (pages with no parent), handling pagination.
Uses the v2 API endpoint /wiki/api/v2/spaces/{space-id}/pages?depth=root.
Sourcepub async fn get_page_comments(
&self,
page_id: &str,
) -> Result<Vec<ConfluenceComment>>
pub async fn get_page_comments( &self, page_id: &str, ) -> Result<Vec<ConfluenceComment>>
Lists footer comments on a Confluence page, handling pagination.
Sourcepub async fn add_page_comment(
&self,
page_id: &str,
body_adf: &AdfDocument,
) -> Result<()>
pub async fn add_page_comment( &self, page_id: &str, body_adf: &AdfDocument, ) -> Result<()>
Adds a footer comment to a Confluence page.
Sourcepub async fn get_labels(&self, page_id: &str) -> Result<Vec<ConfluenceLabel>>
pub async fn get_labels(&self, page_id: &str) -> Result<Vec<ConfluenceLabel>>
Fetches all labels on a Confluence page, handling pagination.
Trait Implementations§
Source§impl AtlassianApi for ConfluenceApi
impl AtlassianApi for ConfluenceApi
Source§fn get_content<'a>(
&'a self,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<ContentItem>> + Send + 'a>>
fn get_content<'a>( &'a self, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<ContentItem>> + Send + 'a>>
Fetches a content item by its identifier.
Source§fn update_content<'a>(
&'a self,
id: &'a str,
body_adf: &'a AdfDocument,
title: Option<&'a str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn update_content<'a>( &'a self, id: &'a str, body_adf: &'a AdfDocument, title: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Updates a content item’s body and optionally its title.
Source§fn verify_auth<'a>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>>
fn verify_auth<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>>
Verifies authentication and returns a display name.
Source§fn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Returns the backend type name (“jira” or “confluence”).
Auto Trait Implementations§
impl Freeze for ConfluenceApi
impl !RefUnwindSafe for ConfluenceApi
impl Send for ConfluenceApi
impl Sync for ConfluenceApi
impl Unpin for ConfluenceApi
impl UnsafeUnpin for ConfluenceApi
impl !UnwindSafe for ConfluenceApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more