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

Support oauth token endpoint, add wiki verification support, fix issue #420 #438

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

rhart92
Copy link
Contributor

@rhart92 rhart92 commented Aug 11, 2023

Fixes #420 and #73.

@rhart92 rhart92 changed the title Support oauth token endpoint, add wiki verification support, fix #420 Support oauth token endpoint, add wiki verification support, fix issue #420 Aug 11, 2023
verified_by: null
}

type VerificationPropertyResponse = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it auto-generated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@@ -525,6 +553,29 @@ export default class Client {
})
}

public readonly oauth = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows you to call the token endpoint.

const { Client } = require("@notionhq/client")

// Initializing a client
const notion = new Client({ ... })

const tokenResponse = await notion.oauth.token({ ... })

This is similar to how we nest all the block methods under a blocks object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... we were not allowed to call the token endpoint before your change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not through the SDK 😓 See #73

@rhart92 rhart92 merged commit bcff1ef into main Aug 11, 2023
@rhart92 rhart92 deleted the ryan--oauth-wiki-verification-heading-toggleable branch August 11, 2023 22:18
@rhart92 rhart92 mentioned this pull request Aug 14, 2023
rhart92 added a commit that referenced this pull request Oct 3, 2023
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.

Heading blocks do not have the is_toggleable property in their types
2 participants