File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change 11# notionapi
2+
23[ ![ GitHub tag (latest SemVer)] ( https://img.shields.io/github/v/tag/jomei/notionapi?label=go%20module )] ( https://github.com/jomei/notionapi/tags )
34[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/jomei/notionapi.svg )] ( https://pkg.go.dev/github.com/jomei/notionapi )
45[ ![ Test] ( https://github.com/jomei/notionapi/actions/workflows/test.yml/badge.svg )] ( https://github.com/jomei/notionapi/actions/workflows/test.yml )
56
6- An API client for the [ Notion API] ( https://developers.notion.com/ ) implemented in Golang
7+ This is a Golang implementation of an API client for the [ Notion API] ( https://developers.notion.com/ ) .
78
8- # Supported APIs
9- It supports all APIs for Notion API version ` 2022-06-28 `
9+ ## Supported APIs
1010
11- # Installation
11+ It supports all APIs of the Notion API version ` 2022-06-28 ` .
1212
13+ ## Installation
14+
15+ ``` bash
16+ go get github.com/jomei/notionapi
1317```
14- $ go get github.com/jomei/notionapi
15- ```
1618
17- # Getting started
18- Follow Notion’s [ getting started guide] ( https://developers.notion.com/docs/getting-started ) to obtain an Integration Token.
19+ ## Usage
20+
21+ First, please follow the [ Getting Started Guide] ( https://developers.notion.com/docs/getting-started ) to obtain an integration token.
1922
20- ## Example
23+ ### Initialization
2124
22- Make a new ` Client `
25+ Import this library and initialize the API client using the obtained integration token.
2326
2427``` go
2528import " github.com/jomei/notionapi"
2629
27-
28- client := notionapi.NewClient (" your-integration-token" )
30+ client := notionapi.NewClient (" your_integration_token" )
2931```
30- Then, use client's methods to retrieve or update your content
32+
33+ ### Calling the API
34+
35+ You can use the methods of the initialized client to call the Notion API. Here is an example of how to retrieve a page:
3136
3237``` go
33- page , err := client.Page .Get (context.Background (), " your-page-id " )
38+ page , err := client.Page .Get (context.Background (), " your_page_id " )
3439if err != nil {
35- // do something
40+ // Handle the error
3641}
3742```
You can’t perform that action at this time.
0 commit comments