Skip to content

Commit

Permalink
Adapt readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbolliger committed Feb 22, 2024
1 parent b2a8fce commit e6cc3f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
5 changes: 1 addition & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit e6cc3f8

Please sign in to comment.