diff options
| author | Ritesh Ghosh <[email protected]> | 2023-08-07 14:18:37 +0530 |
|---|---|---|
| committer | Ritesh Ghosh <[email protected]> | 2023-08-07 14:18:37 +0530 |
| commit | f52dc709da9de7056559d45cf2301f290ce18a9f (patch) | |
| tree | cd7b281594e41d7efb894d57413df6b84c25a770 | |
| parent | 663d5761d603b7a0e9046093c7379530434c9a6c (diff) | |
| download | aniwatch-api-f52dc709da9de7056559d45cf2301f290ce18a9f.tar.xz aniwatch-api-f52dc709da9de7056559d45cf2301f290ce18a9f.zip | |
docs: reverted json response schema to js & updated local installation guide
| -rw-r--r-- | README.md | 399 |
1 files changed, 201 insertions, 198 deletions
@@ -62,7 +62,7 @@ ## Table of Contents - [Installation](#installation) - - [Local Installation](#local-installation) + - [Local](#local) - [Documentation](#documentation) - [GET Anime Home Page](#get-anime-home-page) - [GET Anime About Info](#get-anime-about-info) @@ -75,21 +75,24 @@ ## <span id="installation">💻 Installation</span> -### Local Installation +### Local -1. Run the following command to clone the repository and install the dependencies. +1. Clone the repository and move into the directory. ```bash git clone https://github.com/ghoshRitesh12/zoro.to-api.git - cd zoro.to-api +``` + +2. Install all the dependencies. +```bash npm ci #or yarn install ``` -2. Rename the `.env.example` file to `.env` and update any details required +3. Rename the `.env.example` file to `.env` and update any details required. -3. Start the server! +4. Start the server! ```bash npm start #or yarn start @@ -117,83 +120,83 @@ console.log(data); #### Response Schema -```json +```javascript { - "genres": ["Action", "Cars", "Adventure", ...], - "latestEpisodeAnimes": [ + genres: ["Action", "Cars", "Adventure", ...], + latestEpisodeAnimes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "spotlightAnimes": [ + spotlightAnimes: [ { - "id": "string", - "name": "string", - "jname": "string", - "poster": "string", - "description": "string", - "rank": "number", + id: string, + name: string, + jname: string, + poster: string, + description: string, + rank: number, }, {...}, ], - "top10Animes": { - "today": [ + top10Animes: { + today: [ { - "episodes": { - "sub": "number", - "dub": "number", + episodes: { + sub: number, + dub: number, }, - "id": "string", - "name": "string", - "poster": "string", - "rank": "number" + id: string, + name: string, + poster: string, + rank: number }, {...}, ], - "month": [...], - "week": [...] + month: [...], + week: [...] }, - "topAiringAnimes": [ + topAiringAnimes: [ { - "id": "string", - "name": "string", - "jname": "string", - "poster": "string", + id: string, + name: string, + jname: string, + poster: string, }, {...}, ], - "topUpcomingAnimes": [ + topUpcomingAnimes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "trendingAnimes": [ + trendingAnimes: [ { - "id": "string", - "name": "string", - "poster": "string", - "rank": "number", - "}," + id: string, + name: string, + poster: string, + rank: number, + }, {...}, ], } @@ -223,85 +226,85 @@ console.log(data); #### Response Schema -```json +```javascript { - "anime": [ - "info": { - "id": "string", - "name": "string""," - "poster": "string", - "description": "string", - "stats": { - "rating": "string", - "quality": "string", - "episodes": { - "sub": "number", - "dub": "number" + anime: [ + info: { + id: string, + name: string, + poster: string, + description: string, + stats: { + rating: string, + quality: string, + episodes: { + sub: number, + dub: number }, - "type": "string", - "duration": "string" + type: string, + duration: string } } - "moreInfo": { - "aired": "string", - "genres": ["Action", "Mystery", ...], - "status": "string", - "studios": "string", - "duration": "string" + moreInfo: { + aired: string, + genres: ["Action", "Mystery", ...], + status: string, + studios: string, + duration: string ... } ], - "mostPopularAnimes": [ + mostPopularAnimes: [ { - "episodes": { - "sub": "number", - "dub": "number", + episodes: { + sub: number, + dub: number, }, - "id": "string", - "jname": "string", - "name": "string", - "poster": "string", - "type": "string" + id: string, + jname: string, + name: string, + poster: string, + type: string }, {...}, ], - "recommendedAnimes": [ + recommendedAnimes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "relatedAnimes": [ + relatedAnimes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "seasons": [ + seasons: [ { - "id": "string", - "name": "string", - "title": "string", - "poster": "string", - "isCurrent": "boolean" + id: string, + name: string, + title: string, + poster: string, + isCurrent: boolean }, {...} ] @@ -316,10 +319,10 @@ console.log(data); #### Query Parameters -| Parameter | Type | Description | Required? | Default | -| :-------: | :------: | :---------------------------------------------------------------: | :-------: | :-----: | -| `q` | "string" | The search query, i.e. the title of the item you are looking for. | Yes | -- | -| `page` | number | The page number of the result. | No | `1` | +| Parameter | Type | Description | Required? | Default | +| :-------: | :----: | :---------------------------------------------------------------: | :-------: | :-----: | +| `q` | string | The search query, i.e. the title of the item you are looking for. | Yes | -- | +| `page` | number | The page number of the result. | No | `1` | #### Request sample @@ -331,40 +334,40 @@ console.log(data); #### Response Schema -```json +```javascript { - "animes": [ + animes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "mostPopularAnimes": [ + mostPopularAnimes: [ { - "episodes": { - "sub": "number", - "dub": "number", + episodes: { + sub: number, + dub: number, }, - "id": "string", - "jname": "string", - "name": "string", - "poster": "string", - "type": "string" + id: string, + jname: string, + name: string, + poster: string, + type: string }, {...}, ], - "totalPages": 1, - "currentPage": 1, - "hasNextPage": false + totalPages: 1, + currentPage: 1, + hasNextPage: false } ``` @@ -376,9 +379,9 @@ console.log(data); #### Path Parameters -| Parameter | Type | Description | Required? | Default | -| :-------: | :------: | :----------------------: | :-------: | :-----: | -| `name` | "string" | The name of anime genre. | Yes | -- | +| Parameter | Type | Description | Required? | Default | +| :-------: | :----: | :----------------------: | :-------: | :-----: | +| `name` | string | The name of anime genre. | Yes | -- | #### Query Parameters @@ -396,42 +399,42 @@ console.log(data); #### Response Schema -```json +```javascript { - "animes": [ + animes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "genreName": "string", - "genres": ["Action", "Cars", "Adventure", ...] - "topAiringAnimes": [ + genreName: string, + genres: ["Action", "Cars", "Adventure", ...] + topAiringAnimes: [ { - "episodes": { - "sub": "number", - "dub": "number", + episodes: { + sub: number, + dub: number, }, - "id": "string", - "jname": "string", - "name": "string", - "poster": "string", - "type": "string" + id: string, + jname: string, + name: string, + poster: string, + type: string }, {...}, ], - "totalPages": 38, - "currentPage": 2, - "hasNextPage": true + totalPages: 38, + currentPage: 2, + hasNextPage: true } ``` @@ -443,9 +446,9 @@ console.log(data); #### Path Parameters -| Parameter | Type | Description | Required? | Default | -| :--------: | :------: | :--------------------: | :-------: | :-----: | -| `category` | "string" | The category of anime. | Yes | -- | +| Parameter | Type | Description | Required? | Default | +| :--------: | :----: | :--------------------: | :-------: | :-----: | +| `category` | string | The category of anime. | Yes | -- | #### Query Parameters @@ -463,45 +466,45 @@ console.log(data); #### Response Schema -```json +```javascript { - "animes": [ + animes: [ { - "id": "string", - "name": "string", - "poster": "string", - "duration": "string", - "type": "string", - "rating": "string", - "episodes": { - "sub": "number", - "dub": "number", + id: string, + name: string, + poster: string, + duration: string, + type: string, + rating: string, + episodes: { + sub: number, + dub: number, } }, {...}, ], - "category": "string", - "genres": ["Action", "Cars", "Adventure", ...] - "top10Animes": { - "today": [ + category: string, + genres: ["Action", "Cars", "Adventure", ...] + top10Animes: { + today: [ { - "episodes": { - "sub": "number", - "dub": "number", + episodes: { + sub: number, + dub: number, }, - "id": "string", - "name": "string", - "poster": "string", - "rank": "number" + id: string, + name: string, + poster: string, + rank: number }, {...}, ], - "month": [...], - "week": [...] + month: [...], + week: [...] }, - "totalPages": 100, - "currentPage": 2, - "hasNextPage": true + totalPages: 100, + currentPage: 2, + hasNextPage: true } ``` |
