by kjksf · 7y ago · 0 comments
It's for Go but one could easily port it to any other language. It's just HTTP requests and some light processing of JSON responses.
I use it so that I can have my blog content in Notion. In a daily cron job I download the data from Notion, convert it to HTML and publish on Netlify as a static website. This script is open source: https://github.com/kjk/blog
Basically I use Notion as CMS.
I described my reverse-engineering process in https://blog.kowalczyk.info/article/88aee8f43620471aa9dbcad2...
Whether there's a programmatic API or not, that's another matter entirely.
When used on publicly visible pages, there's no need for login token.
For private pages, the user would have to provide a new login token when it expired.
It only happened once in several months for me.
I'm hoping that my library will become obsolete when they have an official API.
I talked with them and gave them my wishlist for what capabilities the official API should have.