Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typing hints for page update (WIP) #103

Closed
wants to merge 2 commits into from

Conversation

Sc0ra
Copy link
Contributor

@Sc0ra Sc0ra commented May 25, 2021

Hello !

Since I started using Notion API and this SDK, I wanted to work around typing.
Because the notion API format is quite heavy, it's easy to do mistake when filling properties, at page update for example.

This PoC shows how we could use generic typing to validate the page update method inputs based on the page definition.

Would be glad if you can give me some feedbacks !

Cheers

@Sc0ra Sc0ra changed the title Draft: Add typing hints at update Add typing hints at update (WIP) May 25, 2021
@Sc0ra Sc0ra marked this pull request as draft May 25, 2021 20:50
@Sc0ra Sc0ra changed the title Add typing hints at update (WIP) Add typing hints for pageupdate (WIP) May 25, 2021
@Sc0ra Sc0ra changed the title Add typing hints for pageupdate (WIP) Add typing hints for page update (WIP) May 25, 2021
@justjake
Copy link
Contributor

@Sc0ra We've since switched a new typing system with different types for requests and responses. Types are now more accurate as they are automatically generated from our API.

@justjake justjake closed this Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants