https://github.com/muhammadpauzi/naruto-api
🐱👤 API to display data for almost all characters in Naruto.
https://github.com/muhammadpauzi/naruto-api
expressjs mongodb mongoose naruto public-api
Last synced: 4 months ago
JSON representation
🐱👤 API to display data for almost all characters in Naruto.
- Host: GitHub
- URL: https://github.com/muhammadpauzi/naruto-api
- Owner: muhammadpauzi
- Created: 2021-12-11T11:40:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-12T02:46:02.000Z (almost 4 years ago)
- Last Synced: 2025-04-09T17:52:44.922Z (6 months ago)
- Topics: expressjs, mongodb, mongoose, naruto, public-api
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Naruto API
🐱👤 API to display data for almost all characters in Naruto.**Built with :**
- ExpressJS
- Mongoose
- MongoDB## Installation
1. **Clone the Repository**
```bash
git clone https://github.com/othneildrew/Best-README-Template.git
```2. **Install packages**
```bash
yarn install
# or
npm install
```3. **Setting `.env` file**
```env
PORT = 5000
MONGODB_URI = local | cloud
```4. **Seed data to MongoDB**
This process is relatively long depending on your internet connection.
```bash
yarn seed:json
yarn seed:db
```5. **And run the API**
```bash
yarn start
# or
npm start
```## Enpoints
### Get all characters
- Request
- Method : `GET`
- Endpoint : `/api/characters`
- URL Params / Query :
- `q=[string]` : For full-text search (optional)
- `skip=[number]` : For skip/offset data (optional)
- `limit=[number]` : For limiting data (optional)
- `sort=['ASC', 'DESC']` : For sorting data by the name (optional)- Response
- Success
```json
{
"total": "number",
"previous":{
"skip": "number"
},
"next":{
"skip": "number"
},
"data": [
{
"_id": "string",
"name": "string",
"picture": "string"
}
]
}
```Thanks...🙏