Categorygithub.com/faetools/go-notion
module
0.1.19
Repository: https://github.com/faetools/go-notion.git
Documentation: pkg.go.dev

# README

go-notion

Devtool version Maintainer Go Report Card GoDoc Reference

About

This repository contains an OpenAPI definition of Notion's API based on their documentation as well as a go library to use the API.

Usage

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/faetools/go-notion/pkg/notion"
)


func main() {
	ctx := context.Background()

	cl, err := notion.NewDefaultClient("[bearer token]")
	if err != nil {
		log.Fatal(err)
	}

	p, err := cl.GetNotionPage(ctx, "[page ID]")
	if err != nil {
		log.Fatal(err)
	}

	...
}

Expansions

There are several expansions (work in progress):

Contribution

We use a code generator to generate go code based on the OpenAPI. In addition to the auto generated code, we added a number of convenience methods.

Feel free to contribute to this repo by making a PR that changes the OpenAPI. We will then run the code generator to generate respective go code.

Alternatively, feel free to add to the manually written convenience methods.

# Packages

No description provided by the author
Code generated by devtool; DO NOT EDIT.
No description provided by the author