pub struct NblmClient { /* private fields */ }Implementations§
Source§impl NblmClient
Audio-related API implementations
impl NblmClient
Audio-related API implementations
pub async fn create_audio_overview( &self, notebook_id: &str, request: AudioOverviewRequest, ) -> Result<AudioOverviewResponse>
pub async fn delete_audio_overview(&self, notebook_id: &str) -> Result<()>
Source§impl NblmClient
Notebook-related API implementations
impl NblmClient
Notebook-related API implementations
pub async fn create_notebook( &self, title: impl Into<String>, ) -> Result<Notebook>
Sourcepub async fn batch_delete_notebooks(
&self,
request: BatchDeleteNotebooksRequest,
) -> Result<BatchDeleteNotebooksResponse>
pub async fn batch_delete_notebooks( &self, request: BatchDeleteNotebooksRequest, ) -> Result<BatchDeleteNotebooksResponse>
Delete notebooks using the batchDelete API.
§Known Issues (as of 2025-10-19)
The API only accepts a single notebook name despite being named “batchDelete”.
Multiple names result in HTTP 400 error. Use delete_notebooks which handles
this limitation by calling the API once per notebook.
Sourcepub async fn delete_notebooks(
&self,
notebook_names: Vec<String>,
) -> Result<BatchDeleteNotebooksResponse>
pub async fn delete_notebooks( &self, notebook_names: Vec<String>, ) -> Result<BatchDeleteNotebooksResponse>
Delete one or more notebooks.
§Implementation Note
Despite the underlying API being named “batchDelete”, it only accepts one notebook at a time (as of 2025-10-19). This method works around this limitation by calling the API sequentially for each notebook.
Sourcepub async fn list_recently_viewed(
&self,
page_size: Option<u32>,
) -> Result<ListRecentlyViewedResponse>
pub async fn list_recently_viewed( &self, page_size: Option<u32>, ) -> Result<ListRecentlyViewedResponse>
List recently viewed notebooks.
§Pagination
The page_size parameter can be used to limit the number of results.
Valid range is 1-500. Default is 500 notebooks.
Source§impl NblmClient
Source-related API implementations
impl NblmClient
Source-related API implementations
pub async fn batch_create_sources( &self, notebook_id: &str, request: BatchCreateSourcesRequest, ) -> Result<BatchCreateSourcesResponse>
pub async fn add_sources( &self, notebook_id: &str, contents: Vec<UserContent>, ) -> Result<BatchCreateSourcesResponse>
pub async fn batch_delete_sources( &self, notebook_id: &str, request: BatchDeleteSourcesRequest, ) -> Result<BatchDeleteSourcesResponse>
pub async fn delete_sources( &self, notebook_id: &str, source_names: Vec<String>, ) -> Result<BatchDeleteSourcesResponse>
pub async fn upload_source_file( &self, notebook_id: &str, file_name: &str, content_type: &str, data: Vec<u8>, ) -> Result<UploadSourceFileResponse>
Sourcepub async fn get_source(
&self,
notebook_id: &str,
source_id: &str,
) -> Result<NotebookSource>
pub async fn get_source( &self, notebook_id: &str, source_id: &str, ) -> Result<NotebookSource>
Source§impl NblmClient
impl NblmClient
pub fn new( token_provider: Arc<dyn TokenProvider>, project_number: impl Into<String>, location: impl Into<String>, endpoint_location: impl Into<String>, ) -> Result<Self>
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_retry_config(self, config: RetryConfig) -> Self
pub fn with_user_project(self, project: impl Into<String>) -> Self
Sourcepub fn with_base_url(self, base: impl Into<String>) -> Result<Self>
pub fn with_base_url(self, base: impl Into<String>) -> Result<Self>
Override API base URL (for tests). Accepts absolute URL. Trims trailing slash.