Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ariefhk/tesaurus-api
https://github.com/ariefhk/tesaurus-api
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ariefhk/tesaurus-api
- Owner: ariefhk
- Created: 2024-04-17T08:47:04.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-17T11:29:20.000Z (9 months ago)
- Last Synced: 2024-04-17T12:39:12.948Z (9 months ago)
- Language: TypeScript
- Homepage: https://tesaurus-api.cyclic.app/api/dictionary?sinonim=makan
- Size: 797 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tesaurus API
## Resource Data
[Tesaurus Data - Victoria](https://github.com/victoriasovereigne/tesaurus/blob/master/dict.json)
## How To Run
1. Install Library
```bash
npm i
```2. Running Project on Development
```bash
npm run dev
```2. Running Project on Production
```bash
npm run start
```## Route
### - Search Sinonim
Endpoint : GET /api/dictionary
Query Parameter :
- sinonim : string, required
Example : GET /api/dictionary?sinonim=makan
Response Body (Success) :
```json
{
"status": true,
"message": "Sukses mendapatkan sinonim kata makan",
"data": ["dahar", "mamah", "santap"]
}
```Response Body (Failed Not Found) :
```json
{
"errors": "Kata m tidak ditemukan dalam kamus!"
}
```Response Body (Validation Error) :
```json
{
"errors": "Validation Error : {\"issues\":[{\"code\":\"invalid_type\",\"expected\":\"string\",\"received\":\"undefined\",\"path\":[\"sinonim\"],\"message\":\"Required\"}],\"name\":\"ZodError\"}"
}
```