remove_content

Function remove_content 

Source
pub async fn remove_content(
    client: &mut NlpClient,
    request: RemoveContentRequest,
) -> Result<RemoveContentResponse, Box<dyn Error>>
Expand description

Removes the content for the given request.

§Arguments

  • client - The client to use to communicate with the server.
  • request - The request to send to the server.

§Example

use aristech_nlp_client::{get_client, remove_content, TlsOptions, RemoveContentRequest, ContentMetaData};
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let mut client = get_client("https://nlp.example.com".to_string(), Some(TlsOptions::default())).await?;
    let request = RemoveContentRequest {
        id: "123".to_string(),
        metadata: Some(ContentMetaData {
            project_id: "456".to_string(),
            ..ContentMetaData::default()
        }),
        ..RemoveContentRequest::default()
    };
    let response = remove_content(&mut client, request).await?;
    println!("{:?}", response);
    Ok(())
}