pub struct SliteClient { /* private fields */ }Expand description
Typed Slite integration client for Leash.
Implementations§
Source§impl SliteClient
impl SliteClient
Sourcepub fn new(leash: LeashIntegrations) -> Self
pub fn new(leash: LeashIntegrations) -> Self
Create a new SliteClient.
Sourcepub async fn search_notes(
&self,
params: &SearchNotesParams,
) -> Result<Value, LeashError>
pub async fn search_notes( &self, params: &SearchNotesParams, ) -> Result<Value, LeashError>
Searches notes in Slite based on a query and returns the top search results.
Sourcepub async fn ask_slite(
&self,
params: &AskSliteParams,
) -> Result<Value, LeashError>
pub async fn ask_slite( &self, params: &AskSliteParams, ) -> Result<Value, LeashError>
Asks a question to Slite and returns an answer with sources.
Sourcepub async fn get_note(
&self,
params: &GetNoteParams,
) -> Result<Value, LeashError>
pub async fn get_note( &self, params: &GetNoteParams, ) -> Result<Value, LeashError>
Retrieves a specific note from Slite by its ID.
Sourcepub async fn get_note_children(
&self,
params: &GetNoteChildrenParams,
) -> Result<Value, LeashError>
pub async fn get_note_children( &self, params: &GetNoteChildrenParams, ) -> Result<Value, LeashError>
Retrieves all child notes of a specific note from Slite.
Sourcepub async fn create_note(
&self,
params: &CreateNoteParams,
) -> Result<Value, LeashError>
pub async fn create_note( &self, params: &CreateNoteParams, ) -> Result<Value, LeashError>
Creates a new note in Slite with the specified title and optional content.
Sourcepub async fn update_note(
&self,
params: &UpdateNoteParams,
) -> Result<Value, LeashError>
pub async fn update_note( &self, params: &UpdateNoteParams, ) -> Result<Value, LeashError>
Updates an existing note in Slite. Can update the title and/or content.
Auto Trait Implementations§
impl !Freeze for SliteClient
impl !RefUnwindSafe for SliteClient
impl Send for SliteClient
impl Sync for SliteClient
impl Unpin for SliteClient
impl UnsafeUnpin for SliteClient
impl !UnwindSafe for SliteClient
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