-
Notifications
You must be signed in to change notification settings - Fork 591
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 'Intro to Notion API' example #441
Add 'Intro to Notion API' example #441
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple questions, but lgtm!
`NOTION_PAGE_ID`: Use the ID of any Notion page that you want to test adding content to. | ||
|
||
The page ID is the 32 character string at the end of any page URL. | ||
![A Notion page URL with the ID highlighted](./assets/page_id.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be an example Notion page URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is!
} | ||
|
||
// After adding pages, query the database entries (pages) | ||
queryDatabase(databaseId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be useful to add console.log("Querying database...")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing, just added :)
Hey @parulbaweja thanks for the review. I added your suggestion so it looks like it needs another review. If everything looks good, do you mind merging it too after approving? I don't have permissions to merge in this repo 🥲 |
* add new example (wip) * update readme * add intermediate example * add more comments and resources to each example * add additional resources section * rename some files for consistency, clean up readme, more console logs * make linter happy * readme updates * clean up links * add console for querying
Adds a new example to the
/examples
directory. There was a request to have more code samples that build up in complexity so each section has a simple version that gets progressively more complex.There will be an
advanced
section added in a future PR (likely some existing examples moved over here to organize them a bit more).This can be easily expanded as more requests come in; for example, the current
/basic
files can be grouped into ablocks
subdirectory if other "basic" examples get requested.Note: Part of the request was to heavily comment this code here.