Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tempor1s/notiongo
(Golang) Go bindings for Notion (WIP)
https://github.com/tempor1s/notiongo
go golang notion notion-api notiongo
Last synced: 27 days 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 (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T22:02:10.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T16:31:52.151Z (6 months ago)
- Topics: go, golang, notion, notion-api, notiongo
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NotionGo (WIP)
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/tempor1s/notiongo)
[![Test Status](https://github.com/google/go-github/workflows/tests/badge.svg)](https://github.com/google/go-github/actions?query=workflow%3Atests)
[![Test Coverage](https://codecov.io/gh/google/go-github/branch/master/graph/badge.svg)](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.