@@ -284,7 +284,7 @@ await client.sources.refresh(nb_id, src.id) # Re-fetch URL content
284284| ` download_audio(notebook_id, output_path, artifact_id=None) ` | ` str, str, str ` | ` str ` | Download audio to file (MP4/MP3) |
285285| ` download_video(notebook_id, output_path, artifact_id=None) ` | ` str, str, str ` | ` str ` | Download video to file (MP4) |
286286| ` download_infographic(notebook_id, output_path, artifact_id=None) ` | ` str, str, str ` | ` str ` | Download infographic to file (PNG) |
287- | ` download_slide_deck(notebook_id, output_dir , artifact_id=None) ` | ` str, str, str ` | ` list[ str] ` | Download slides to directory (PNGs) |
287+ | ` download_slide_deck(notebook_id, output_path , artifact_id=None) ` | ` str, str, str ` | ` str ` | Download slide deck as PDF |
288288
289289** Download Methods:**
290290
@@ -301,15 +301,14 @@ path = await client.artifacts.download_video(nb_id, "video.mp4")
301301# Download infographic
302302path = await client.artifacts.download_infographic(nb_id, " infographic.png" )
303303
304- # Download slide deck (creates multiple files)
305- slide_paths = await client.artifacts.download_slide_deck(nb_id, " ./slides/ " )
306- # Returns: [ "./slides/slide_001.png", "./slides/slide_002.png", ...]
304+ # Download slide deck as PDF
305+ path = await client.artifacts.download_slide_deck(nb_id, " ./slides.pdf " )
306+ # Returns: "./slides.pdf"
307307```
308308
309309** Notes:**
310310- If ` artifact_id ` is not specified, downloads the first completed artifact of that type
311311- Raises ` ValueError ` if no completed artifact is found
312- - ` download_slide_deck ` creates the output directory if it doesn't exist
313312- Some URLs require browser-based download (handled automatically)
314313
315314#### Export Methods
@@ -318,20 +317,23 @@ Export artifacts to Google Docs or Google Sheets.
318317
319318| Method | Parameters | Returns | Description |
320319| --------| ------------| ---------| -------------|
321- | ` export_report(notebook_id, artifact_id, title="Export" , export_type=1 ) ` | ` str, str, str, int ` | ` Any ` | Export report to Google Docs |
322- | ` export_data_table(notebook_id, artifact_id, title="Export" ) ` | ` str, str, str ` | ` Any ` | Export data table to Google Sheets |
323- | ` export(notebook_id, artifact_id=None , content=None , title="Export" , export_type=1 ) ` | ` str, str, str, str, int ` | ` Any ` | Generic export to Docs/Sheets |
320+ | ` export_report(notebook_id, artifact_id, title, export_type) ` | ` str, str, str, ExportType ` | ` Any ` | Export report to Google Docs/Sheets |
321+ | ` export_data_table(notebook_id, artifact_id, title) ` | ` str, str, str ` | ` Any ` | Export data table to Google Sheets |
322+ | ` export(notebook_id, artifact_id, content, title, export_type) ` | ` str, str, str, str, ExportType ` | ` Any ` | Generic export to Docs/Sheets |
324323
325- ** Export Types:**
326- - ` export_type=1 ` : Export to Google Docs
327- - ` export_type=2 ` : Export to Google Sheets
324+ ** Export Types (ExportType enum) :**
325+ - ` ExportType.DOCS ` (1) : Export to Google Docs
326+ - ` ExportType.SHEETS ` (2) : Export to Google Sheets
328327
329328``` python
329+ from notebooklm import ExportType
330+
330331# Export a report to Google Docs
331332result = await client.artifacts.export_report(
332333 nb_id,
333334 artifact_id = " report_123" ,
334- title = " My Briefing Doc"
335+ title = " My Briefing Doc" ,
336+ export_type = ExportType.DOCS
335337)
336338# result contains the Google Docs URL
337339
@@ -343,12 +345,12 @@ result = await client.artifacts.export_data_table(
343345)
344346# result contains the Google Sheets URL
345347
346- # Generic export (e.g., export any artifact to Docs )
348+ # Generic export (e.g., export any artifact to Sheets )
347349result = await client.artifacts.export(
348350 nb_id,
349351 artifact_id = " artifact_789" ,
350352 title = " Exported Content" ,
351- export_type = 1 # 1=Docs, 2=Sheets
353+ export_type = ExportType. SHEETS
352354)
353355```
354356
@@ -694,6 +696,14 @@ class SlideDeckLength(Enum):
694696 SHORT = 2
695697```
696698
699+ ### Export
700+
701+ ``` python
702+ class ExportType (Enum ):
703+ DOCS = 1 # Export to Google Docs
704+ SHEETS = 2 # Export to Google Sheets
705+ ```
706+
697707### Chat Configuration
698708
699709``` python
0 commit comments