pub struct NblmClient { /* private fields */ }Implementations§
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.
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.
pub async fn batch_create_sources( &self, notebook_id: &str, request: BatchCreateSourcesRequest, ) -> Result<BatchCreateSourcesResponse>
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<()>
Sourcepub async fn list_recently_viewed(
&self,
page_size: Option<u32>,
page_token: Option<&str>,
) -> Result<ListRecentlyViewedResponse>
pub async fn list_recently_viewed( &self, page_size: Option<u32>, page_token: Option<&str>, ) -> Result<ListRecentlyViewedResponse>
List recently viewed notebooks.
§Pagination (Not Implemented by API)
While this method accepts page_size and page_token parameters,
the NotebookLM API does not currently implement pagination:
page_sizeparameter is accepted but ignored by the APInext_page_tokenis never returned in the response- All available notebooks are returned regardless of page_size
These parameters are included for future compatibility if the API implements pagination in the future.