pub struct ScreenpipeClient { /* private fields */ }
Expand description
Main client for interacting with the Screenpipe API
Implementations§
Source§impl ScreenpipeClient
impl ScreenpipeClient
Sourcepub fn with_client(base_url: &str, client: HttpClient) -> Result<Self>
pub fn with_client(base_url: &str, client: HttpClient) -> Result<Self>
Create a new ScreenpipeClient with custom HTTP client configuration
pub async fn handle_response<T: DeserializeOwned>( response: Response, ) -> Result<T>
pub fn build_url(&self, path: &str) -> Result<Url>
Sourcepub async fn health(&self) -> Result<HealthResponse>
pub async fn health(&self) -> Result<HealthResponse>
Get server health status
Sourcepub async fn search(&self, params: SearchRequest) -> Result<SearchResponse>
pub async fn search(&self, params: SearchRequest) -> Result<SearchResponse>
Search for content
Sourcepub async fn list_audio_devices(&self) -> Result<Vec<AudioDevice>>
pub async fn list_audio_devices(&self) -> Result<Vec<AudioDevice>>
List available audio devices
Sourcepub async fn list_monitors(&self) -> Result<Vec<Monitor>>
pub async fn list_monitors(&self) -> Result<Vec<Monitor>>
List available monitors
Add tags to content
Remove tags from content
Sourcepub async fn get_pipe_info(&self, pipe_id: &str) -> Result<PipeInfo>
pub async fn get_pipe_info(&self, pipe_id: &str) -> Result<PipeInfo>
Get pipe information
Sourcepub async fn list_pipes(&self) -> Result<Vec<PipeInfo>>
pub async fn list_pipes(&self) -> Result<Vec<PipeInfo>>
List all pipes
Sourcepub async fn download_pipe(&self, url: &str) -> Result<PipeResponse>
pub async fn download_pipe(&self, url: &str) -> Result<PipeResponse>
Download a pipe from URL
Sourcepub async fn enable_pipe(&self, pipe_id: &str) -> Result<PipeResponse>
pub async fn enable_pipe(&self, pipe_id: &str) -> Result<PipeResponse>
Enable a pipe
Sourcepub async fn disable_pipe(&self, pipe_id: &str) -> Result<PipeResponse>
pub async fn disable_pipe(&self, pipe_id: &str) -> Result<PipeResponse>
Disable a pipe
Sourcepub async fn update_pipe_config(
&self,
pipe_id: &str,
config: HashMap<String, Value>,
) -> Result<PipeResponse>
pub async fn update_pipe_config( &self, pipe_id: &str, config: HashMap<String, Value>, ) -> Result<PipeResponse>
Update pipe configuration
Sourcepub async fn execute_raw_sql(&self, query: &str) -> Result<Value>
pub async fn execute_raw_sql(&self, query: &str) -> Result<Value>
Execute raw SQL query
Sourcepub async fn add_content(
&self,
request: AddContentRequest,
) -> Result<SuccessResponse>
pub async fn add_content( &self, request: AddContentRequest, ) -> Result<SuccessResponse>
Add content to the database
Sourcepub async fn input_control(
&self,
action: InputAction,
) -> Result<SuccessResponse>
pub async fn input_control( &self, action: InputAction, ) -> Result<SuccessResponse>
Control input (experimental)
Sourcepub async fn merge_videos(
&self,
video_paths: Vec<String>,
) -> Result<MergeVideosResponse>
pub async fn merge_videos( &self, video_paths: Vec<String>, ) -> Result<MergeVideosResponse>
Merge videos (experimental)
Trait Implementations§
Source§impl Clone for ScreenpipeClient
impl Clone for ScreenpipeClient
Source§fn clone(&self) -> ScreenpipeClient
fn clone(&self) -> ScreenpipeClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ScreenpipeClient
impl !RefUnwindSafe for ScreenpipeClient
impl Send for ScreenpipeClient
impl Sync for ScreenpipeClient
impl Unpin for ScreenpipeClient
impl !UnwindSafe for ScreenpipeClient
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