Ketion.so logo

go-notion

GitHub tag (latest SemVer) Go Reference GitHub go.mod Go version GitHub Repo stars

Go Report Card Renovate enabled Test reviewdog Coverage Status

Contributor Covenant

Go written Notion SDK.

Note: The Notion API is in beta phase

Supported APIs

It supports all APIs for Notion API (as for 2021-05-15).

  • Blocks
  • Databases
  • Pages
  • Search
  • Users

Is this package needs update, please raise an issue or a PR.

Installation

Include this in your code as below:

import "github.com/ketion-so/go-notion/notion"

or using go get

$  go get -u github.com/ketion-so/go-notion

Usage

Initialize the client as below:

client := notion.NewClient("access token")

Here are some examples:

List Dashboard

resp, _ := client.Databases.List(ctx)
fmt.Println(resp.Databases)

Get user

user, _ := client.Users.Get(ctx, "user ID")

License

This tool is released under Apache License 2.0. See details here

GitHub

https://github.com/ketion-so/go-notion