• Stars
    star
    450
  • Rank 93,758 (Top 2 %)
  • Language
    Go
  • License
    BSD 2-Clause "Sim...
  • Created almost 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Notion API SDK, written in Golang

notionapi

GitHub tag (latest SemVer) Go Reference Test

This is a Golang implementation of an API client for the Notion API.

Supported APIs

It supports all APIs of the Notion API version 2022-06-28.

Installation

go get github.com/jomei/notionapi

Usage

First, please follow the Getting Started Guide to obtain an integration token.

Initialization

Import this library and initialize the API client using the obtained integration token.

import "github.com/jomei/notionapi"

client := notionapi.NewClient("your_integration_token")

Calling the API

You can use the methods of the initialized client to call the Notion API. Here is an example of how to retrieve a page:

page, err := client.Page.Get(context.Background(), "your_page_id")
if err != nil {
    // Handle the error
}