An open API service indexing awesome lists of open source software.

https://github.com/flix-29/notionapiclient

A simple java client to interact with the Notion Api
https://github.com/flix-29/notionapiclient

api java maven notion

Last synced: 2 months ago
JSON representation

A simple java client to interact with the Notion Api

Awesome Lists containing this project

README

        

# NotionApiClient

This is a simple API client for Notion.so. It is based on the
official Notion API documentation.

## How to use

First, you need to create a Notion integration.

1. Go to the Notion integrations page.
2. Click on the `+ New integration` button.
3. Fill in the required fields and click on the `Submit` button.
4. Copy the `Internal Integration Token` and save it in a safe place.
5. Share the integration with your workspace and add it to the Sites or Databases you want the Api to have access to.

After you have created your integration, you can import the `NotionApiClient` via maven or gradle.
### Maven
```xml

de.flix29
notion-api-client
0.2.0

```

### Gradle
```groovy
implementation 'de.flix29:notion-api-client:0.2.0'
```

### Usage
You need to create a `NotionClient` object and pass the `Internal Integration Token` to the constructor.

```java
import de.flix29.notionApiClient.NotionClient;

NotionClient notionClient = new NotionClient("your-token");
```
Then, you can use the methods provided in the `NotionClient` class to interact with the Notion API.

## Supported Endpoints
Currently, only the `Get` endpoints are supported. These are the following:

### Database

- `GET` Retrieve a Database

### Pages

- `GET` Retrieve a Page
- `GET` Retrieve a Page property item

### Blocks

- `GET` Retrieve a Block
- `GET` Retrieve a Block children

### Users

- `GET` List all Users
- `GET` Retrieve a User
- `GET` Retrieve your token's bot user