A simple blog application built on the notion api.
To run this project, you will need to add the following environment variables to your .env file
NOTION_TOKEN
{ your notion api secret key }
NOTION_DATABASE_ID
{ the notion database you will be querying }
Clone the project
git clone https://github.com/kodegrenade/notion-api
Go to the project directory
cd notion-api
Install dependencies
npm install
Start the server
npm run start
Open the url below on your broswer to access the available endpoints.
http://localhost/api-docs
GET /api/v1/blog/posts
POST /api/v1/create/post
Parameter | Type | Description |
---|---|---|
title |
string |
Required. Blog post title |
tags |
array |
Required. Blog post tags |
content |
text |
Required. Blog post content |
author |
string |
Required. Blog post author |
GET /api/v1/blog/:id
POST /api/v1/blog/search
PS: Supports only search by title
Parameter | Type | Description |
---|---|---|
search |
string |
Required. Blog post title |
- Updating blog post
- Deleting blog post
Please feel free to fork this repo and contribute by submitting a pull request to enhance the functionalities.