jomei / notionapi

A Notion API SDK, written in Golang

Home Page:https://pkg.go.dev/github.com/jomei/notionapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
}

About

A Notion API SDK, written in Golang

https://pkg.go.dev/github.com/jomei/notionapi

License:BSD 2-Clause "Simplified" License


Languages

Language:Go 100.0%