Create an integration to retrieve an API token, add your database and page ID's as variables in the collection, and start making your requests!
For our full documentation, including sample integrations and guides, visit developers.notion.com
Need more help? Join our developer community on Slack
To install the library, use the following command:
go get github.com/go-api-libs/notion/pkg/notion
package main
import (
"context"
"github.com/go-api-libs/notion/pkg/notion"
"github.com/google/uuid"
)
func main() {
c, err := notion.NewClient()
if err != nil {
panic(err)
}
ctx := context.Background()
page, err := c.GetPage(ctx, uuid.MustParse("96245c8f-1784-44a4-82ad-1941127c3ec3"))
if err != nil {
panic(err)
}
// Use page object
}
package main
import (
"context"
"github.com/go-api-libs/notion/pkg/notion"
"github.com/google/uuid"
)
func main() {
c, err := notion.NewClient()
if err != nil {
panic(err)
}
ctx := context.Background()
blocksList, err := c.GetBlocks(ctx, uuid.MustParse("96245c8f-1784-44a4-82ad-1941127c3ec3"), ¬ion.GetBlocksParams{PageSize: 100})
if err != nil {
panic(err)
}
// Use blocksList object
}
- Go Reference: The Go reference documentation for the client package.
- OpenAPI Specification: The OpenAPI 3.1.0 specification.
- Go Report Card: Check the code quality report.
If you have any contributions to make, please submit a pull request or open an issue on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.