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
- Host: GitHub
- URL: https://github.com/flix-29/notionapiclient
- Owner: Flix-29
- License: mit
- Created: 2024-12-08T16:10:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-03-17T14:41:19.000Z (2 months ago)
- Last Synced: 2025-03-17T15:50:59.958Z (2 months ago)
- Topics: api, java, maven, notion
- Language: Java
- Homepage:
- Size: 183 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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
```xmlde.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