kevinjalbert / notion-toolbox

This is a collection of Notion tools that work in tandem together.
https://kevinjalbert.com/consolidating-notion-projects-into-notion-toolbox/
MIT License
687 stars 59 forks source link

Add and use block presenter #33

Closed kevinjalbert closed 4 years ago

kevinjalbert commented 4 years ago

The idea here is that the block presenter wraps the block result from notion-py to be used in the API. It inherits from 'dict' so that jsonify will auto convert it to the raw values that the block presenter has.

As BlockPresenter auto distinguishes between CollectionRowBlocks and TextBlocks. This makes the API results richer in information.