Go written SDK for Notion.so API

Ketion.so logo

go-notion

GitHub tag (latest SemVer) Go Reference GitHub go.mod Go version GitHub Repo stars

Go Report Card Renovate enabled Test reviewdog Coverage Status

Contributor Covenant

Go written Notion SDK.

Note: The Notion API is in beta phase

Supported APIs

It supports all APIs for Notion API (as for 2021-05-15).

  • Blocks
  • Databases
  • Pages
  • Search
  • Users

Is this package needs update, please raise an issue or a PR.

Installation

Include this in your code as below:

import "github.com/ketion-so/go-notion/notion"

or using go get

$  go get -u github.com/ketion-so/go-notion

Usage

Initialize the client as below:

client := notion.NewClient("access token")

Here are some examples:

List Dashboard

resp, _ := client.Databases.List(ctx)
fmt.Println(resp.Databases)

Get user

user, _ := client.Users.Get(ctx, "user ID")

License

This tool is released under Apache License 2.0. See details here

Comments
  • fix: change listdatabase title type from string to []TextObject

    fix: change listdatabase title type from string to []TextObject

    WHY

    List database return []TextObject and not string. The notion documentation is wrong. This is the json i got from my curl.

    {
        "object": "list",
        "results": [
            {
                "object": "database",
                "id": "00000000-0000-0000-0000-000000000000",
                "created_time": "2021-05-26T11:07:57.029Z",
                "last_edited_time": "2021-05-26T11:08:00.000Z",
                "title": [
                    {
                        "type": "text",
                        "text": {
                            "content": "test",
                            "link": null
                        },
                        "annotations": {
                            "bold": false,
                            "italic": false,
                            "strikethrough": false,
                            "underline": false,
                            "code": false,
                            "color": "default"
                        },
                        "plain_text": "test",
                        "href": null
                    }
                ],
                "properties": {
                    "Tags": {
                        "id": "ZVRw",
                        "type": "multi_select",
                        "multi_select": {
                            "options": []
                        }
                    },
                    "Name": {
                        "id": "title",
                        "type": "title",
                        "title": {}
                    }
                }
            }
        ],
        "next_cursor": null,
        "has_more": false
    }
    
  • Update module github.com/google/go-cmp to v0.5.6

    Update module github.com/google/go-cmp to v0.5.6

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/google/go-cmp | require | patch | v0.5.5 -> v0.5.6 |


    Release Notes

    google/go-cmp

    v0.5.6

    Compare Source

    Reporter changes:

    Minor documentation changes:


    Configuration

    πŸ“… Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • suggestion: Correct repository description

    suggestion: Correct repository description

    The description of this repository is 'SDK for Notion.io API'. But the Notion's official url is https://www.notion.so. So, how about replacing it into notion.so or Notion? Or please tell me if there is other intention. Thanks πŸ™πŸ»

  • chore(deps): update module go to 1.19

    chore(deps): update module go to 1.19

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | go (source) | golang | minor | 1.16 -> 1.19 |


    Release Notes

    golang/go

    v1.19.3

    v1.19.2

    v1.19.1

    v1.19.0

    v1.18.8

    v1.18.7

    v1.18.6

    v1.18.5

    v1.18.4

    v1.18.3

    v1.18.2

    v1.18.1

    v1.18.0

    v1.17.13

    v1.17.12

    v1.17.11

    v1.17.10

    v1.17.9

    v1.17.8

    v1.17.7

    v1.17.6

    v1.17.5

    v1.17.4

    v1.17.3

    v1.17.2

    v1.17.1

    v1.17.0


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update actions/cache action to v3

    chore(deps): update actions/cache action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/cache | action | major | v2 -> v3 |


    Release Notes

    actions/cache

    v3

    Compare Source


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update actions/setup-go action to v3

    chore(deps): update actions/setup-go action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/setup-go | action | major | v2 -> v3 |


    Release Notes

    actions/setup-go

    v3

    Compare Source


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update actions/checkout action to v3

    chore(deps): update actions/checkout action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/checkout | action | major | v2 -> v3 |


    Release Notes

    actions/checkout

    v3

    Compare Source


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    github-actions
    .github/workflows/reviewdog.yml
    • actions/checkout v2
    • actions/setup-go v2
    • reviewdog/action-golangci-lint v1
    .github/workflows/test.yml
    • actions/setup-go v2
    • actions/checkout v2
    • actions/cache v2
    • actions/setup-go v2
    • actions/checkout v2
    • actions/cache v2
    • shogo82148/actions-goveralls v1
    gomod
    go.mod
    • go 1.16
    • github.com/google/go-cmp v0.5.5
    • github.com/mitchellh/mapstructure v1.4.1

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
  • fix(deps): update module github.com/mitchellh/mapstructure to v1.5.0

    fix(deps): update module github.com/mitchellh/mapstructure to v1.5.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/mitchellh/mapstructure | require | minor | v1.4.1 -> v1.5.0 |


    Release Notes

    mitchellh/mapstructure

    v1.5.0

    Compare Source

    v1.4.3

    Compare Source

    v1.4.2

    Compare Source


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

An API client for the Notion API implemented in Golang

An API client for the Notion API implemented in Golang

Dec 30, 2022
NotionGo is a Go client library for accessing the Notion API v1.

NotionGo (WIP) NotionGo is a Go client library for accessing the Notion API v1. Installation NotionGo is compatible with modern Go releases in module

May 22, 2021
Go client for official Notion API.

notion notion is a Go client for the Notion API. Features The client supports all (non-deprecated) endpoints available in the Notion API, as of May 15

Dec 5, 2021
Minimal go library for Notion's v1 API
Minimal go library for Notion's v1 API

go-notion (beta) go-notion is a minimal Go client library for Notion's v1 API. Check the usage or examples to see how to access Notion's v1 API. NB: N

Dec 7, 2022
A Go wrapper around the Notion API

go-notion A Go wrapper around the Notion API. | ⚠ This package is new and under active development. How to Use Install the package go get github.com/b

Nov 19, 2021
A cross platform desktop service that watches custom folders for file changes and updates the corresponding database in Notion.

A cross platform desktop service that watches custom folders for file changes and updates the corresponding database in Notion. Perfect for tracking reading lists

Mar 12, 2022
An app/container built in Go to automate a Twitter account using Notion

Notion Tweeter Notion Tweeter is a utility I built using Go to help automate scheduling my tweets using Notion as a backend. More documentation coming

Sep 26, 2022
A go sdk for baidu netdisk open platform η™ΎεΊ¦η½‘η›˜εΌ€ζ”ΎεΉ³ε° Go SDK

Pan Go Sdk θ―₯δ»£η εΊ“δΈΊη™ΎεΊ¦η½‘η›˜εΌ€ζ”ΎεΉ³ε°Goθ―­θ¨€ηš„SDK

Nov 22, 2022
Nextengine-sdk-go: the NextEngine SDK for the Go programming language

NextEngine SDK for Go nextengine-sdk-go is the NextEngine SDK for the Go programming language. Getting Started Install go get github.com/takaaki-s/nex

Dec 7, 2021
Commercetools-go-sdk is fork of original commercetools-go-sdk

commercetools-go-sdk The Commercetools Go SDK is automatically generated based on the official API specifications of Commercetools. It should therefor

Dec 13, 2021
Sdk-go - Go version of the Synapse SDK

synapsesdk-go Synapse Protocol's Go SDK. Currently in super duper alpha, do not

Jan 7, 2022
Redash-go-sdk - An SDK for the programmatic management of Redash, in Go
Redash-go-sdk - An SDK for the programmatic management of Redash, in Go

Redash Go SDK An SDK for the programmatic management of Redash. The main compone

Dec 13, 2022
Go Wechaty is a Conversational SDK for Chatbot Makers Written in Go
Go Wechaty is a Conversational SDK for Chatbot Makers Written in Go

go-wechaty Connecting Chatbots Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 6 lines of Go. Voice of the De

Dec 30, 2022
Inofficial SDK for gameanalytics written in Golang

gameanalytics-go gameanalytics-go is an inofficial sdk for gameanalytics which is written in go. It currently can send the following events: Business

Sep 3, 2022
A Facebook Graph API SDK For Go.

A Facebook Graph API SDK In Golang This is a Go package that fully supports the Facebook Graph API with file upload, batch request and marketing API.

Dec 12, 2022
A Golang SDK for Medium's OAuth2 API

Medium SDK for Go This repository contains the open source SDK for integrating Medium's OAuth2 API into your Go app. Install go get github.com/Medium/

Nov 28, 2022
The Fabric Token SDK is a set of API and services that lets developers create token-based distributed application on Hyperledger Fabric.

The Fabric Token SDK is a set of API and services that let developers create token-based distributed application on Hyperledger Fabric.

Dec 14, 2022
SDK to provide access to JUNO API (Open Banking) (2.0.0)

Juno API - Golang SDK Juno API (Open Banking) (2.0.0) Why? This project is part of my personal portfolio, so, I'll be happy if you could provide me an

Aug 9, 2021
Instagram Messaging API GO SDK

Instagram Messaging API GO SDK Introduction Instabot, Instagram Messaging API GO SDK makes it easy to work with instagram messaging API. It uses Insta

Nov 13, 2022