Closed
Description
Define a strategy to migrate to the official notion API:
- keeping the unofficial API functional
- retaining most functionalities
- avoid duplicating existing codes.
- take the fastest and simplest path
Authentication can't be done in code. It only relies on a bearer token - an Authorize header transmitted with each request. Get a token using your notion account.
Path 1: TDD
Operation 1 - Create unit tests
- to get a specific root page given its name
- to get all blocks of a page, including all it's children pages, using pagination where necessary
- to process all blocks into html, using most of the existing code
Recreate a new block model if necessary.
In a new specific nuget.
Bonus:
- use a // pipeline (or reactivex) for ultra fast block to html transcoding
After op1 is finished, the API surface should be at least the same as the "old" nuget.
Operation 2 - Upgrade the blazor templates
- Use the new nuget from op1
- Simplify the authentication option model (use only the bearer token)
- publish changes
Bonus:
- add notion's data change detection (and trigger UI update)