https://github.com/amberpixels/notion-sdk-go
Yet Another (unofficial) Notion Go Client
https://github.com/amberpixels/notion-sdk-go
Last synced: 11 months ago
JSON representation
Yet Another (unofficial) Notion Go Client
- Host: GitHub
- URL: https://github.com/amberpixels/notion-sdk-go
- Owner: amberpixels
- License: bsd-2-clause
- Created: 2025-01-05T18:26:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-12T18:07:25.000Z (over 1 year ago)
- Last Synced: 2025-03-13T03:20:00.961Z (over 1 year ago)
- Language: Go
- Size: 378 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
👋 This project is a *hard fork* of [jomei/notionapi](https://github.com/jomei/notionapi),
focusing on introducing new features, breaking changes, and enhanced API coverage.
[](https://github.com/amberpixels/notion-sdk-go/tags)
[](https://pkg.go.dev/github.com/amberpixels/notion-sdk-go)
[](https://github.com/amberpixels/notion-sdk-go/actions/workflows/go.yml)
## Supported APIs
It supports all APIs of the Notion API version `2022-06-28`.
## Installation
```bash
go get github.com/amberpixels/notion-sdk-go
```
## 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/amberpixels/notion-sdk-go"
client := notion.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
}
```