pub struct ConfluenceClient { /* private fields */ }Implementations§
Source§impl ConfluenceClient
impl ConfluenceClient
pub fn new(base_url: impl Into<String>, auth: ConfluenceAuth) -> Self
pub fn with_http_client(self, http: Client) -> Self
pub fn base_url(&self) -> &str
pub fn auth(&self) -> &ConfluenceAuth
pub fn with_api_version(self, api_version: Option<&str>) -> Self
Sourcepub fn with_proxy(self, headers: HashMap<String, String>) -> Self
pub fn with_proxy(self, headers: HashMap<String, String>) -> Self
Configure proxy mode with headers added to every request. When proxy is active, provider auth headers are suppressed.
pub fn rest_api_url(&self, path: &str) -> String
pub async fn get_json<T>(&self, path: &str) -> Result<T>where
T: DeserializeOwned,
pub async fn post_json<T, B>(&self, path: &str, body: &B) -> Result<T>
pub async fn put_json<T, B>(&self, path: &str, body: &B) -> Result<T>
pub async fn post_empty_json<B>(&self, path: &str, body: &B) -> Result<()>
pub async fn delete_empty(&self, path: &str) -> Result<()>
Trait Implementations§
Source§impl Clone for ConfluenceClient
impl Clone for ConfluenceClient
Source§fn clone(&self) -> ConfluenceClient
fn clone(&self) -> ConfluenceClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfluenceClient
impl Debug for ConfluenceClient
Source§impl KnowledgeBaseProvider for ConfluenceClient
impl KnowledgeBaseProvider for ConfluenceClient
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name for logging (e.g. “confluence”).
Source§fn get_spaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbSpace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_spaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbSpace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List available spaces / knowledge base containers.
Source§fn list_pages<'life0, 'async_trait>(
&'life0 self,
params: ListPagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbPage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_pages<'life0, 'async_trait>(
&'life0 self,
params: ListPagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbPage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List pages in a space with pagination.
Source§fn get_page<'life0, 'life1, 'async_trait>(
&'life0 self,
page_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<KbPageContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_page<'life0, 'life1, 'async_trait>(
&'life0 self,
page_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<KbPageContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a single page with full body content and metadata.
Source§fn create_page<'life0, 'async_trait>(
&'life0 self,
params: CreatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_page<'life0, 'async_trait>(
&'life0 self,
params: CreatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new page.
Source§fn update_page<'life0, 'async_trait>(
&'life0 self,
params: UpdatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_page<'life0, 'async_trait>(
&'life0 self,
params: UpdatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update an existing page.
Auto Trait Implementations§
impl Freeze for ConfluenceClient
impl !RefUnwindSafe for ConfluenceClient
impl Send for ConfluenceClient
impl Sync for ConfluenceClient
impl Unpin for ConfluenceClient
impl UnsafeUnpin for ConfluenceClient
impl !UnwindSafe for ConfluenceClient
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