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

Migrate to notion public API #32

Open
pi0 opened this issue May 13, 2021 · 8 comments
Open

Migrate to notion public API #32

pi0 opened this issue May 13, 2021 · 8 comments
Labels
api Relates to the private or public Notion API enhancement New feature or request help wanted Extra attention is needed

Comments

@pi0
Copy link

pi0 commented May 13, 2021

Hi @janniks. Thanks for all the awesome efforts you put into this package and nuxt support.

If you've followed notion news (tweet) there is now a public API and notion-sdk-js (pending for universal support makenotion/notion-sdk-js#38). I'm wondering how is your timing and take on this. And if needed any help would be more than happy to work on a PR.

@janniks
Copy link
Owner

janniks commented May 13, 2021

Yes, definitely up for it (happy to take PRs as well). It was always the plan to work with the official APIs at some point.

Although I will also check what react-notion is doing regarding this — it's nice to copy from "upstream".

@janniks janniks added enhancement New feature or request help wanted Extra attention is needed labels Jul 21, 2021
@janniks
Copy link
Owner

janniks commented Jul 21, 2021

The current beta API from differs a lot form the splitbee notion-api-worker. This is likely a longer issue.

If anybody wants to tackle this issue — hit me up!

@janniks janniks closed this as completed Jul 21, 2021
@janniks janniks reopened this Jul 21, 2021
@janniks janniks added the api Relates to the private or public Notion API label Aug 3, 2021
@xianbinKit
Copy link

@janniks hello

I really want to use Notion official API with vue-notion, I have less experience, but I want to try. where you are in this subject ? can we talk ?

@janniks
Copy link
Owner

janniks commented Aug 4, 2021

Hi, sure! I don't really know anything about the new API. I looked at the rough structure, and it looked very different from the splitbee/notion-api-worker — that's when I gave up 😅

It would start with retrieving the (child) blocks of a page (which is also a ~block). Then use this as a replacement for vue-notion blockMap. And then changes have to be made everywhere, where the unofficial blockMap differs from the block children response of the official API.

@xianbinKit
Copy link

xianbinKit commented Aug 7, 2021

Hi @janniks

I make a test on top of Vue Notion.

the test code is here : https://github.com/xianbinKit/vue-notion

to do a test :

export NOTION_SECRET=YOUR_NOTIOIN_SECRET_KEY;npm run notionServer

the demo json result is here : https://github.com/xianbinKit/vue-notion/blob/main/notionServer/demoPage.json

and the Notion Page is here : https://wishcompta.notion.site/Public-Test-Notion-Page-36baad2799494b13aa09f7d2a66b2561

I Tried to make changes for Vue Notion, but it seems to take much time.....So I can't make NotionRenderer work.

the demo json result is more Notion-type-like structure, do you think you can change Vue Notion for this structure json ? it takes many days ?

Thank you

basic structure :

const page =  {
   id: ....
   blocks: [ // child blocks
        {  // 1st child block
             id: ...
             blocks: // child of 1st child block
        }
   ]
}

@janniks
Copy link
Owner

janniks commented Oct 14, 2021

Hi 👋🏻 Thanks for the testing.
Unfortunately, the public API does not yet support as much as the private API. It will take a while to implement this — sorry

@aromeronavia
Copy link

What I see is that the Public API is more focused on integrations around workflows (when Notion database item is created, do some work in This other platform). I do think using the private API is more useful for this use case

@ebanDev
Copy link

ebanDev commented Nov 28, 2023

Hi there ! It's been more than a year, anything new about the public API usage ? :) I think that would be a really interesting feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Relates to the private or public Notion API enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants