Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jomei/notionapi
A Notion API SDK, written in Golang
https://github.com/jomei/notionapi
go golang notion notion-api
Last synced: 2 minutes ago
JSON representation
A Notion API SDK, written in Golang
- Host: GitHub
- URL: https://github.com/jomei/notionapi
- Owner: jomei
- License: bsd-2-clause
- Created: 2021-05-23T13:42:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-17T07:29:13.000Z (26 days ago)
- Last Synced: 2024-12-06T08:03:12.282Z (7 days ago)
- Topics: go, golang, notion, notion-api
- Language: Go
- Homepage: https://pkg.go.dev/github.com/jomei/notionapi
- Size: 179 KB
- Stars: 517
- Watchers: 6
- Forks: 81
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - notionapi
README
# notionapi
[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/jomei/notionapi?label=go%20module)](https://github.com/jomei/notionapi/tags)
[![Go Reference](https://pkg.go.dev/badge/github.com/jomei/notionapi.svg)](https://pkg.go.dev/github.com/jomei/notionapi)
[![Test](https://github.com/jomei/notionapi/actions/workflows/test.yml/badge.svg)](https://github.com/jomei/notionapi/actions/workflows/test.yml)This is a Golang implementation of an API client for the [Notion API](https://developers.notion.com/).
## Supported APIs
It supports all APIs of the Notion API version `2022-06-28`.
## Installation
```bash
go get github.com/jomei/notionapi
```## Usage
First, please follow the [Getting Started Guide](https://developers.notion.com/docs/getting-started) to obtain an integration token.
### Initialization
Import this library and initialize the API client using the obtained integration token.
```go
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:
```go
page, err := client.Page.Get(context.Background(), "your_page_id")
if err != nil {
// Handle the error
}
```