From e6cc3f83ee5cc825bf7407467996fef6258418b7 Mon Sep 17 00:00:00 2001 From: Yann Bolliger Date: Thu, 22 Feb 2024 20:09:40 +0100 Subject: [PATCH] Adapt readme. --- README.md | 12 ++++++------ src/config.ts | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8c70ebb..1350f64 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,8 @@ import NotionExporter from "notion-exporter" const tokenV2 = ... const fileToken = ... const blockId = "3af0a1e347dd40c5ba0a2c91e234b2a5" -const allfiles = false // don't download PDF and image files -const recursive = false // download only blockId -await new NotionExporter(tokenV2, fileToken, nofiles, recursive).getMdString(blockId) +await new NotionExporter(tokenV2, fileToken).getMdString(blockId) ``` ### API @@ -45,10 +43,11 @@ most accurate information. #### Constructor Provide the [required Cookies](#needed-cookies) as authentification to create a -new exporter client. +new exporter client. For configuration options, +[refer to the definition](./src/config.ts). ```ts -const exporter = new NotionExporter(tokenV2: string, fileToken: string, nofiles: boolean, recursive: boolean) +const exporter = new NotionExporter(tokenV2: string, fileToken: string, config?: Config) ``` #### Methods @@ -132,4 +131,5 @@ use-case? Please submit issues and PRs on Github. ### Contributors -- Yann Bolliger, [@yannbolliger](https://github.com/yannbolliger). +- Yann Bolliger, [@yannbolliger](https://github.com/yannbolliger) +- Guillermo C. Martínez, [@telekosmos](https://github.com/telekosmos) diff --git a/src/config.ts b/src/config.ts index 87328b3..2c36ae9 100644 --- a/src/config.ts +++ b/src/config.ts @@ -8,10 +8,7 @@ export interface Config { timeZone?: string /** Default: en */ locale?: string - /** - * Export all blocks of the DB/page or just the ones in the current view. - * Default: "all" - */ + /** Export all blocks of the DB/page or just the ones in the current view. Default: "all" */ collectionViewExportType?: "currentView" | "all" }