@@ -46,6 +46,8 @@ This is how the notion page looks for this example:
4646``` js
4747const { Client } = require (" @notionhq/client" );
4848const { NotionToMarkdown } = require (" notion-to-md" );
49+ // or
50+ // import {NotionToMarkdown} from "notion-to-md";
4951
5052const notion = new Client ({
5153 auth: " your integration token" ,
@@ -144,14 +146,14 @@ same notion page as before
144146
145147``` js
146148const { Client } = require (" @notionhq/client" );
147- const notion2md = require (" notion-to-md" );
149+ const { NotionToMarkdown } = require (" notion-to-md" );
148150
149151const notion = new Client ({
150152 auth: " your integration token" ,
151153});
152154
153155// passing notion client to the option
154- const n2m = new notion2md ({ notionClient: notion });
156+ const n2m = new NotionToMarkdown ({ notionClient: notion });
155157
156158(async () => {
157159 // get all blocks in the page
@@ -174,10 +176,10 @@ const n2m = new notion2md({ notionClient: notion });
174176- independent of @notionhq/client
175177
176178``` js
177- const notion2md = require (" notion-to-md" );
179+ const { NotionToMarkdown } = require (" notion-to-md" );
178180
179181// notion client not required
180- const n2m = new notion2md ();
182+ const n2m = new NotionToMarkdown ();
181183
182184const result = n2m .blockToMarkdown (block);
183185console .log (result);
0 commit comments