notion-api | simple Notion API for reading your Notion page | REST library
kandi X-RAY | notion-api Summary
kandi X-RAY | notion-api Summary
A simple Notion API for reading your Notion page or database data, encapsulated from notion-client. You can use notion-api.craigary.net as the end point, or deploy it on Vercel for your instance.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the properties of a block
notion-api Key Features
notion-api Examples and Code Snippets
Community Discussions
Trending Discussions on notion-api
QUESTION
"Not building properly" meaning "not finishing building at all". I've set up a very basic blog project with dynamic SSR which fetches data from the Notion-API to generate static blog pages. Everything works fine when I'm running it in next dev
- however when trying to build the project, it runs into an endless loop without any errors shown.
One thought I had was the following:
If I understand the sequence of everything correctly, Next.js already tries building the static sites during next build
. The dynamic site generation relies on an API that I have also coded within the same project, which forwards requests to Notion in order to obfuscate secrets. Obviously no local API will be active during the build, which I am guessing is the error I'm running into?
To illustrate - here's the code for the pages that are to be generated:
...ANSWER
Answered 2022-Mar-13 at 13:18I solved this one by thinking hard about whether an API was actually necessary. Since I already have the Notion-keys accessible project-wide in process.env
, there's no real need to build up an API. Moving the query-logic to helper-functions that I can simply call has solved about every problem I faced.
Learning: Don't just build APIs for everything. It might just make your life harder.
QUESTION
The code that is causing the problem is the code below
...ANSWER
Answered 2022-Jan-21 at 06:29Here's a type definition of GetPageResponse
from node_modules\@notionhq\client\build\src\api-endpoints.d.ts
:
QUESTION
I'm trying to get image url for nested JSON object.
Tried {post.image.url}
but I get an error saying url undefined
I appreciate any help or guidance that could be offered. New to Javascript / React but after an hour of Googling and searching couldn't come up with a solution for this. Must be missing something simple :-P
Here's my code...
...ANSWER
Answered 2021-Mar-02 at 08:21There is no need to call then()
method, if you use async\await
.
await can be put in front of any async promise-based function to pause your code on that line until the promise fulfills, then return the resulting value.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install notion-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page