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

Add support for retrieving all children. #14

Closed dyllan-to-you closed 2 years ago

dyllan-to-you commented 2 years ago

Per https://github.com/souvikinator/notion-to-md/issues/13

Retrieves all children if totalPage == null

Original Implementation violated spec: start_cursor should be treated as an opaque value, and next_cursor should be used to provide the next start_cursor. Deriving from the id may not be acceptable. Typically has_more can be used to determine whether there are more results; this implementation checks for the existence of next_cursor instead.