souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.08k stars 90 forks source link

Retrieve all block children #13

Closed dyllan-to-you closed 2 years ago

dyllan-to-you commented 2 years ago

Hi! I noticed that you currently support passing totalPage to specify the number of pages/blocks that it requests from the API (thanks to #9 )

What about supporting totalPage = null, which would automatically attempts to retrieve all block children instead of a fixed number of pages? It would simplify usecases where you may not know the number of blocks there are on the page beforehand but you always know you want all of them.

If you're open to such a PR I could write and submit one!

souvikinator commented 2 years ago

Hey there @dyllan-to-yu That makes sense, let's give it a try. I'd be glad to receive a PR.

souvikinator commented 2 years ago

@dyllan-to-you Thanks for the contribution. Really appreciate it :)