Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
souvikinator authored Dec 27, 2021
1 parent 6e8767e commit caa4708
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ This is how the notion page looks for this example:
```js
const { Client } = require("@notionhq/client");
const { NotionToMarkdown } = require("notion-to-md");
// or
// import {NotionToMarkdown} from "notion-to-md";

const notion = new Client({
auth: "your integration token",
Expand Down Expand Up @@ -144,14 +146,14 @@ same notion page as before

```js
const { Client } = require("@notionhq/client");
const notion2md = require("notion-to-md");
const { NotionToMarkdown } = require("notion-to-md");

const notion = new Client({
auth: "your integration token",
});

// passing notion client to the option
const n2m = new notion2md({ notionClient: notion });
const n2m = new NotionToMarkdown({ notionClient: notion });

(async () => {
// get all blocks in the page
Expand All @@ -174,10 +176,10 @@ const n2m = new notion2md({ notionClient: notion });
- independent of @notionhq/client

```js
const notion2md = require("notion-to-md");
const { NotionToMarkdown } = require("notion-to-md");

// notion client not required
const n2m = new notion2md();
const n2m = new NotionToMarkdown();

const result = n2m.blockToMarkdown(block);
console.log(result);
Expand Down

0 comments on commit caa4708

Please sign in to comment.