https://github.com/tempor1s/notiongo
(Golang) Go bindings for Notion (WIP)
https://github.com/tempor1s/notiongo
go golang notion notion-api notiongo
Last synced: about 1 month ago
JSON representation
(Golang) Go bindings for Notion (WIP)
- Host: GitHub
- URL: https://github.com/tempor1s/notiongo
- Owner: tempor1s
- License: apache-2.0
- Created: 2021-05-15T02:27:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T22:02:10.000Z (over 2 years ago)
- Last Synced: 2025-03-31T16:11:11.635Z (3 months ago)
- Topics: go, golang, notion, notion-api, notiongo
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NotionGo (WIP)
[](https://pkg.go.dev/github.com/tempor1s/notiongo)
[](https://github.com/google/go-github/actions?query=workflow%3Atests)
[](https://codecov.io/gh/google/go-github)NotionGo is a Go client library for accessing the [Notion API v1]("https://developers.notion.com/").
## Installation ##
NotionGo is compatible with modern Go releases in module mode, with Go installed:
```bash
go get github.com/tempor1s/notiongo/
```will resolve and add the package to the current development module, along with its dependencies.
Alternatively the same can be achieved if you use import in a package:
```go
import "github.com/tempor1s/notiongo/notion"
```## Usage ##
```go
import "github.com/tempor1s/notiongo/v1/notion" // with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/tempor1s/notiongo/notion" // with go modules disabled
```Construct a new Notion client, then use the various services on the client to
access different parts of the Notion API. For example:```go
client := notion.NewClient(nil)// Retrieves a Page object using the ID specified.
page, err := client.page(id)
```### Integration Tests ###
You can run integration tests from the `test` directory. See the integration tests [README](test/README.md).
## Contributing ##
I would like to cover the entire GitHub API and contributions are of course always welcome. The
calling pattern is pretty well established, so adding new methods is relatively
straightforward. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details.## License ##
Library distributed under the Apache-2.0 license found in the [LICENSE](./LICENSE)
file.