{"id":20409066,"url":"https://github.com/ryan-menezes/library-api","last_synced_at":"2026-04-06T08:31:38.652Z","repository":{"id":41305720,"uuid":"502153187","full_name":"Ryan-Menezes/library-api","owner":"Ryan-Menezes","description":"An api for managing a library","archived":false,"fork":false,"pushed_at":"2022-09-06T19:27:46.000Z","size":273,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T02:41:46.812Z","etag":null,"topics":["api","api-rest","books","hapijs","javascript","library","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ryan-Menezes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-10T19:06:52.000Z","updated_at":"2023-05-16T23:03:53.000Z","dependencies_parsed_at":"2023-01-17T21:45:34.305Z","dependency_job_id":null,"html_url":"https://github.com/Ryan-Menezes/library-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ryan-Menezes/library-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryan-Menezes%2Flibrary-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryan-Menezes%2Flibrary-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryan-Menezes%2Flibrary-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryan-Menezes%2Flibrary-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ryan-Menezes","download_url":"https://codeload.github.com/Ryan-Menezes/library-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryan-Menezes%2Flibrary-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-rest","books","hapijs","javascript","library","mongodb","mongoose","nodejs"],"created_at":"2024-11-15T05:39:20.096Z","updated_at":"2026-04-06T08:31:38.626Z","avatar_url":"https://github.com/Ryan-Menezes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# library-api\nAn api for managing a library\n\n## Settings\nHave [Node.js](https://nodejs.org/pt-br/) installed on your machine and through your terminal enter the project directory and run the command \"npm install\":\n```sh\ncd \"project directory\"\nnpm install\n```\nAfter that make sure that [MongoDB](https://www.mongodb.com/) is installed on your machine and run the command \"mongod\" in a separate terminal to start the mongo server:\n```sh\nmongod\n```\nRename the .env.example file to .env\u003cbr\u003e\u003cbr\u003e\nFinally, start the node.js server with the command \"npm start\" in a separate terminal:\n```sh\ncd \"project directory\"\nnpm start\n```\n\nResources available for access via API:\n* [**Auth**](#reference/resources/auth)\n* [**Users**](#reference/resources/users)\n* [**Authors**](#reference/resources/authors)\n* [**Categories**](#reference/resources/categories)\n* [**Books**](#reference/resources/books)\n\n## Methods\nAPI requests must follow the standards:\n\n| Method | Description |\n|---|---|\n| `GET` | Returns information from one or more records. |\n| `POST` | Used to create a new record. |\n| `PUT` | Update record data or change its status. |\n| `DELETE` | Remove a system registry. |\n\n## Responses\n\n| Code | Description |\n|---|---|\n| `200` | Request executed successfully.|\n| `201` | A new record was created successfully.|\n| `204` | No data to present.|\n| `400` | Validation errors or the fields entered do not exist in the system.|\n| `401` | Invalid login data.|\n| `403` | Resource access prohibited.|\n| `404` | Searched record not found (Not found).|\n| `405` | Method not implemented.|\n| `410` | Searched record has been deleted from the system and is no longer available.|\n| `422` | Data entered is outside the scope defined for the field.|\n| `429` | Maximum number of requests reached. (*wait a few seconds and try again*)|\n| `500` | Internal server error|\n\n## List\nDepending on which endpoint you are calling via GET, there may be more parameters available for fetching, but the default will always be this:\nThe `list` actions allow sending the following parameters:\n\n| Param | Description | Type |\n|---|---|---|\n| `page(Optional)` | Informs the beginning of the listing (by default it starts with 1). | Integer |\n| `limit(Optional)` | Returned data limit (by default it starts with 10). | Integer |\n\n## Auth [/]\n\n### Login (/login) [POST]\n\n| Param | Description | Type |\n|---|---|---|\n| `username` | Access `username`. | String |\n| `password` | Access `password`. | String |\n\n+ Request (application/json)\n\n    + Body\n\n            {\n                \"username\": \"RM\",\n                \"password\": \"12345678\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"userId\": \"62bc914eeca68e3e66e8649a\",\n                \"token\": \"access_token\"\n            }\n            \n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Logout (/logout) [POST]\n\n+ Request (application/json)\n    \n    + Headers\n\n            Authorization: Bearer [access_token]\n\n+ Response 200 (application/json)\n\n            {\n                \"token\": \"access_token\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n\n## Users [/users]\n\n### List (/users) [GET]\n\n| Param | Description | Type |\n|---|---|---|\n| `page(Optional)` | Informs the beginning of the listing (by default it starts with 1). | Integer |\n| `limit(Optional)` | Returned data limit (by default it starts with 10). | Integer |\n| `first_name(Optional)` | Firts name of user. | String |\n| `last_name(Optional)` | Last name of user. | String |\n| `username(Optional)` | Username of user. | String |\n\n+ Request (application/x-www-form-urlencoded)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"page\": 1,\n                \"limit\": 10,\n                \"first_name\": \"Ryan\",\n                \"last_name\": \"Menezes\",\n                \"username\": \"RM\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": [\n                  {\n                      \"type\": \"users\",\n                      \"attributes\": {\n                          \"_id\": \"62bc914eeca68e3e66e8649a\",\n                          \"first_name\": \"Ryan\",\n                          \"last_name\": \"Menezes\",\n                          \"username\": \"RM\",\n                          \"avatar\": \"http://localhost:3000/uploads/07d7e7d05a72ef68183bc5c0e34cebfb.png\",\n                          \"created_at\": \"2022-06-29T17:52:14.386Z\",\n                          \"updated_at\": \"2022-06-29T18:49:59.384Z\"\n                      },\n                      \"links\": {\n                          \"self\": \"http://localhost:3000/users/62bc914eeca68e3e66e8649a\"\n                      }\n                  },\n                ...\n              ],\n              \"links\": {\n                  \"self\": \"http://localhost:3000/users\",\n                  \"next\": \"http://localhost:3000/users?limit=10\u0026page=2\",\n                  \"last\": \"http://localhost:3000/users?limit=10\u0026page=1\"\n              }\n          }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n\n### Find (/users/{id}) [GET]\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"users\",\n                    \"attributes\": {\n                        \"_id\": \"62bc914eeca68e3e66e8649a\",\n                        \"first_name\": \"Ryan\",\n                        \"last_name\": \"Menezes\",\n                        \"username\": \"RM\",\n                        \"avatar\": \"http://localhost:3000/uploads/07d7e7d05a72ef68183bc5c0e34cebfb.png\",\n                        \"created_at\": \"2022-06-29T17:52:14.386Z\",\n                        \"updated_at\": \"2022-06-29T18:49:59.384Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/users\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Create (/users) [POST]\n\n| Param | Description | Type |\n|---|---|---|\n| `first_name` | Firts name of user. | String |\n| `last_name` | Last name of user. | String |\n| `username` | Username of user. | String |\n| `password` | Password of user. | String |\n| `avatar(Optional)` | Avatar of user. | File(Image) |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"first_name\": \"Ryan\",\n                \"last_name\": \"Menezes\",\n                \"username\": \"RM\",\n                \"password\": \"12345678\",\n                \"avatar\": [FILE]\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"users\",\n                    \"attributes\": {\n                        \"_id\": \"62bc914eeca68e3e66e8649a\",\n                        \"first_name\": \"Ryan\",\n                        \"last_name\": \"Menezes\",\n                        \"username\": \"RM\",\n                        \"avatar\": \"http://localhost:3000/uploads/def0bd11efb52daacf6c0c27a4f0cd88.png\",\n                        \"created_at\": \"2022-06-29T18:45:15.288Z\",\n                        \"updated_at\": \"2022-06-29T18:45:15.288Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/users\"\n                }\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }                     \n            \n### Update (/users/{id}) [PUT]\n\n| Param | Description | Type |\n|---|---|---|\n| `first_name` | Firts name of user. | String |\n| `last_name` | Last name of user. | String |\n| `username` | Username of user. | String |\n| `password(Optional)` | Password of user. | String |\n| `avatar(Optional)` | Avatar of user. | File(Image) |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"first_name\": \"Ryan\",\n                \"last_name\": \"Menezes\",\n                \"username\": \"RM\",\n                \"password\": \"12345678\",\n                \"avatar\": [FILE]\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"users\",\n                    \"attributes\": {\n                        \"_id\": \"62bc914eeca68e3e66e8649a\",\n                        \"first_name\": \"Ryan\",\n                        \"last_name\": \"Menezes\",\n                        \"username\": \"RM\",\n                        \"avatar\": \"http://localhost:3000/uploads/def0bd11efb52daacf6c0c27a4f0cd88.png\",\n                        \"created_at\": \"2022-06-29T18:45:15.288Z\",\n                        \"updated_at\": \"2022-06-29T18:45:15.288Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/users\"\n                }\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }  \n            \n ### Delete (/users/{id}) [DELETE]\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                  \"type\": \"users\",\n                  \"attributes\": {\n                      \"_id\": \"62bc98884ef43fe6ce0a79b0\",\n                      \"first_name\": \"Ryan\",\n                      \"last_name\": \"Menezes\",\n                      \"username\": \"RM\",\n                      \"avatar\": \"26fd63afd17c910e46531f3562cc5d78.png\",\n                      \"created_at\": \"2022-06-29T18:23:04.922Z\",\n                      \"updated_at\": \"2022-06-29T18:23:04.922Z\"\n                  }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/users\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }   \n            \n## Authors [/authors]\n\n### List (/authors) [GET]            \n\n| Param | Description | Type |\n|---|---|---|\n| `page(Optional)` | Informs the beginning of the listing (by default it starts with 1). | Integer |\n| `limit(Optional)` | Returned data limit (by default it starts with 10). | Integer |\n| `name(Optional)` | Name of author. | String |\n| `slug(Optional)` | Slug of author. | String |\n| `description(Optional)` | Description of author. | String |\n\n+ Request (application/x-www-form-urlencoded)\n\n    + Body\n\n            {\n                \"page\": 1,\n                \"limit\": 10,\n                \"name\": \"Machado de Assis\",\n                \"slug\": \"machado-de-assis\",\n                \"description\": \"Brazilian author\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": [\n                    {\n                        \"type\": \"authors\",\n                        \"attributes\": {\n                            \"_id\": \"62a78ee805b991e50ee8cf94\",\n                            \"name\": \"Machado de Assis\",\n                            \"slug\": \"machado-de-assis\",\n                            \"description\": \"Brazilian author\",\n                            \"avatar\": \"http://localhost:3000/uploads/d7cb9a6e25188e0d69f8b90f0e9fcb60.jpg\",\n                            \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                            \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                        },\n                        \"links\": {\n                            \"self\": \"http://localhost:3000/authors/machado-de-assis\"\n                        }\n                    },\n                    ...\n                ],\n                \"links\": {\n                    \"self\": \"http://localhost:3000/authors\",\n                    \"next\": \"http://localhost:3000/authors?limit=10\u0026page=2\",\n                    \"last\": \"http://localhost:3000/authors?limit=10\u0026page=1\"\n                }\n          }\n \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n\n### Find (/authors/{slug}) [GET]\n\n+ Request (application/json)\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"authors\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Machado de Assis\",\n                        \"slug\": \"machado-de-assis\",\n                        \"description\": \"Brazilian author\",\n                        \"avatar\": \"http://localhost:3000/uploads/d7cb9a6e25188e0d69f8b90f0e9fcb60.jpg\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/authors\"\n                }\n            }\n            \n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Create (/authors) [POST]\n\n| Param | Description | Type |\n|---|---|---|\n| `name` | Name of author. | String |\n| `slug(Optional)` | Slug of author. | String |\n| `description(Optional)` | Description of author. | String |\n| `avatar(Optional)` | Avatar of author. | File(Image) |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"name\": \"Machado de Assis\",\n                \"slug\": \"machado-de-assis\",\n                \"description\": \"Brazilian author\",\n                \"avatar\": [FILE]\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n           {\n                \"data\": {\n                    \"type\": \"authors\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Machado de Assis\",\n                        \"slug\": \"machado-de-assis\",\n                        \"description\": \"Brazilian author\",\n                        \"avatar\": \"http://localhost:3000/uploads/d7cb9a6e25188e0d69f8b90f0e9fcb60.jpg\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/authors\"\n                }\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Update (/authors/{slug}) [PUT]\n\n| Param | Description | Type |\n|---|---|---|\n| `name` | Name of author. | String |\n| `slug(Optional)` | Slug of author. | String |\n| `description(Optional)` | Description of author. | String |\n| `avatar(Optional)` | Avatar of author. | File(Image) |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"name\": \"Machado de Assis\",\n                \"slug\": \"machado-de-assis\",\n                \"description\": \"Brazilian author\",\n                \"avatar\": [FILE]\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n           {\n                \"data\": {\n                    \"type\": \"authors\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Machado de Assis\",\n                        \"slug\": \"machado-de-assis\",\n                        \"description\": \"Brazilian author\",\n                        \"avatar\": \"http://localhost:3000/uploads/d7cb9a6e25188e0d69f8b90f0e9fcb60.jpg\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/authors\"\n                }\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }    \n            \n            \n### Delete (/authors/{slug}) [DELETE]\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"authors\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Machado de Assis\",\n                        \"slug\": \"machado-de-assis\",\n                        \"description\": \"Brazilian author\",\n                        \"avatar\": \"d7cb9a6e25188e0d69f8b90f0e9fcb60.jpg\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/authors\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }          \n\n## Categories [/categories]\n\n### List (/categories) [GET]            \n\n| Param | Description | Type |\n|---|---|---|\n| `page(Optional)` | Informs the beginning of the listing (by default it starts with 1). | Integer |\n| `limit(Optional)` | Returned data limit (by default it starts with 10). | Integer |\n| `name(Optional)` | Name of category. | String |\n| `slug(Optional)` | Slug of category. | String |\n| `description(Optional)` | Description of category. | String |\n\n+ Request (application/x-www-form-urlencoded)\n\n    + Body\n\n            {\n                \"page\": 1,\n                \"limit\": 10,\n                \"name\": \"Horror\",\n                \"slug\": \"horror\",\n                \"description\": \"Horror books\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": [\n                    {\n                        \"type\": \"categories\",\n                        \"attributes\": {\n                            \"_id\": \"62a78ee805b991e50ee8cf94\",\n                            \"name\": \"Horror\",\n                            \"slug\": \"horror\",\n                            \"description\": \"Horror books\",\n                            \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                            \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                        },\n                        \"links\": {\n                            \"self\": \"http://localhost:3000/categories/horror\"\n                        }\n                    },\n                    ...\n                ],\n                \"links\": {\n                    \"self\": \"http://localhost:3000/categories\",\n                    \"next\": \"http://localhost:3000/categories?limit=10\u0026page=2\",\n                    \"last\": \"http://localhost:3000/categories?limit=10\u0026page=1\"\n                }\n          }\n \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Find (/categories/{slug}) [GET]\n\n+ Request (application/json)\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"categories\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Horror\",\n                        \"slug\": \"horror\",\n                        \"description\": \"Horror books\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/categories\"\n                }\n            }\n            \n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Create (/categories) [POST]\n\n| Param | Description | Type |\n|---|---|---|\n| `name` | Name of category. | String |\n| `slug(Optional)` | Slug of category. | String |\n| `description(Optional)` | Description of category. | String |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"name\": \"Horror\",\n                \"slug\": \"horror\",\n                \"description\": \"Horror books\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n           {\n                \"data\": {\n                    \"type\": \"categories\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Horror\",\n                        \"slug\": \"horror\",\n                        \"description\": \"Horror books\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/categories\"\n                }\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Update (/categories/{slug}) [PUT]\n\n| Param | Description | Type |\n|---|---|---|\n| `name` | Name of category. | String |\n| `slug(Optional)` | Slug of category. | String |\n| `description(Optional)` | Description of category. | String |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"name\": \"Horror\",\n                \"slug\": \"horror\",\n                \"description\": \"Horror books\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n           {\n                \"data\": {\n                    \"type\": \"categories\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Horror\",\n                        \"slug\": \"horror\",\n                        \"description\": \"Horror books\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/categories\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Delete (/categories/{slug}) [DELETE]\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"categories\",\n                    \"attributes\": {\n                        \"_id\": \"62a78ee805b991e50ee8cf94\",\n                        \"name\": \"Horror\",\n                        \"slug\": \"horror\",\n                        \"description\": \"Horror books\",\n                        \"created_at\": \"2022-06-13T19:24:24.891Z\",\n                        \"updated_at\": \"2022-06-29T18:28:43.582Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/categories\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n\n## Books [/books]\n\n### List (/books) [GET]            \n\n| Param | Description | Type |\n|---|---|---|\n| `page(Optional)` | Informs the beginning of the listing (by default it starts with 1). | Integer |\n| `limit(Optional)` | Returned data limit (by default it starts with 10). | Integer |\n| `title(Optional)` | Title of book. | String |\n| `slug(Optional)` | Slug of book. | String |\n| `visible(Optional)` | Visible of book. | Boolean |\n| `isbn(Optional)` | ISBN of book. | String |\n| `volume(Optional)` | Volume of book. | Integer |\n| `edition(Optional)` | Edition of book. | Integer |\n| `pages(Optional)` | Pages of book. | Integer |\n| `language(Optional)` | Language of book. | String |\n| `release_date(Optional)` | Release date of book. | Date |\n| `description(Optional)` | Description of book. | String |\n| `details(Optional)` | Details of book. | String |\n\n+ Request (application/x-www-form-urlencoded)\n\n    + Body\n\n            {\n                \"page\": 1,\n                \"limit\": 10,\n                \"title\": \"O pequeno príncipe\",\n\t\t\t\t\"slug\": \"o-pequeno-principe\",\n                \"visible\": true,\n                \"isbn\": \"978-3-16-148410-0\",\n\t\t\t\t\"volume\": 1,\n\t\t\t\t\"edition\": 1,\n                \"pages\": 100,\n                \"language\": \"English\",\n\t\t\t\t\"release_date\": \"2000-01-01T00:00:00.000Z\",\n\t\t\t\t\"description\": \"O pequeno príncipe\",\n\t\t\t\t\"details\": \"O pequeno príncipe\"\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": [\n                    {\n                        \"type\": \"books\",\n                        \"attributes\": {\n                            \"_id\": \"62be2bcfcd31a9205fcee99d\",\n                            \"title\": \"O pequeno príncipe\",\n                            \"slug\": \"o-pequeno-principe\",\n                            \"visible\": true,\n                            \"isbn\": \"978-3-16-148410-0\",\n                            \"volume\": 1,\n                            \"edition\": 1,\n                            \"pages\": 100,\n                            \"language\": \"English\",\n                            \"release_date\": \"2000-01-01T00:00:00.000Z\",\n                            \"description\": \"O pequeno príncipe\",\n\t\t\t\t            \"details\": \"O pequeno príncipe\",\n                            \"poster\": \"http://localhost:3000/uploads/ad8a8f1cda416f0bbb633b289283a59f.jpg\",\n                            \"created_at\": \"2022-06-30T23:03:43.136Z\",\n                            \"updated_at\": \"2022-06-30T23:05:21.043Z\"\n                        },\n                        \"links\": {\n                            \"self\": \"http://localhost:3000/books/o-pequeno-principe\"\n                        }\n                    },\n                    ...\n                ],\n                \"links\": {\n                    \"self\": \"http://localhost:3000/books\",\n                    \"next\": \"http://localhost:3000/books?limit=10\u0026page=2\"\n                }\n            }\n \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Find (/books/{slug}) [GET]\n\n+ Request (application/json)\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"books\",\n                    \"attributes\": {\n                        \"_id\": \"62be2bcfcd31a9205fcee99d\",\n                        \"title\": \"O pequeno príncipe\",\n                        \"slug\": \"o-pequeno-principe\",\n                        \"visible\": true,\n                        \"isbn\": \"978-3-16-148410-0\",\n                        \"volume\": 1,\n                        \"edition\": 1,\n                        \"pages\": 100,\n                        \"language\": \"English\",\n                        \"release_date\": \"2000-01-01T00:00:00.000Z\",\n                        \"description\": \"O pequeno príncipe\",\n                        \"details\": \"O pequeno príncipe\",\n                        \"poster\": \"http://localhost:3000/uploads/ad8a8f1cda416f0bbb633b289283a59f.jpg\",\n                        \"created_at\": \"2022-06-30T23:03:43.136Z\",\n                        \"updated_at\": \"2022-06-30T23:05:21.043Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/books\"\n                }\n            }\n            \n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n ### Create (/books) [POST]\n\n| Param | Description | Type |\n|---|---|---|\n| `title` | Title of book. | String |\n| `slug(Optional)` | Slug of book. | String |\n| `visible(Optional)` | Visible of book. | Boolean |\n| `isbn` | ISBN of book. | String |\n| `volume` | Volume of book. | Integer |\n| `edition` | Edition of book. | Integer |\n| `pages` | Pages of book. | Integer |\n| `language(Optional)` | Language of book. | String |\n| `release_date` | Release date of book. | Date |\n| `description(Optional)` | Description of book. | String |\n| `details(Optional)` | Details of book. | String |\n| `poster(Optional)` | Poster of book. | File(Image) |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"title\": \"O pequeno príncipe\",\n\t\t\t\t\"slug\": \"o-pequeno-principe\",\n\t\t\t\t\"visible\": true,\n                \"isbn\": \"978-3-16-148410-0\",\n\t\t\t\t\"volume\": 1,\n\t\t\t\t\"edition\": 1,\n                \"pages\": 100,\n                \"language\": \"English\",\n\t\t\t\t\"release_date\": \"2000-01-01T00:00:00.000Z\",\n\t\t\t\t\"description\": \"O pequeno príncipe\",\n\t\t\t\t\"details\": \"O pequeno príncipe\",\n                \"poster\": FILE\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n           {\n                \"data\": {\n                    \"type\": \"books\",\n                    \"attributes\": {\n                        \"_id\": \"62be2bcfcd31a9205fcee99d\",\n                        \"title\": \"O pequeno príncipe\",\n                        \"slug\": \"o-pequeno-principe\",\n                        \"visible\": true,\n                        \"isbn\": \"978-3-16-148410-0\",\n                        \"volume\": 1,\n                        \"edition\": 1,\n                        \"pages\": 100,\n                        \"language\": \"English\",\n                        \"release_date\": \"2000-01-01T00:00:00.000Z\",\n                        \"description\": \"O pequeno príncipe\",\n                        \"details\": \"O pequeno príncipe\",\n                        \"poster\": \"http://localhost:3000/uploads/ad8a8f1cda416f0bbb633b289283a59f.jpg\",\n                        \"created_at\": \"2022-06-30T23:03:43.136Z\",\n                        \"updated_at\": \"2022-06-30T23:05:21.043Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/books\"\n                }\n            }\n            \n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Update (/books/{slug}) [PUT]\n\n| Param | Description | Type |\n|---|---|---|\n| `title` | Title of book. | String |\n| `slug(Optional)` | Slug of book. | String |\n| `visible(Optional)` | Visible of book. | Boolean |\n| `isbn` | ISBN of book. | String |\n| `volume` | Volume of book. | Integer |\n| `edition` | Edition of book. | Integer |\n| `pages` | Pages of book. | Integer |\n| `language(Optional)` | Language of book. | String |\n| `release_date` | Release date of book. | Date |\n| `description(Optional)` | Description of book. | String |\n| `details(Optional)` | Details of book. | String |\n| `poster(Optional)` | Poster of book. | File(Image) |\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n    + Body\n\n            {\n                \"title\": \"O pequeno príncipe\",\n\t\t\t\t\"slug\": \"o-pequeno-principe\",\n\t\t\t\t\"visible\": true,\n                \"isbn\": \"978-3-16-148410-0\",\n\t\t\t\t\"volume\": 1,\n\t\t\t\t\"edition\": 1,\n                \"pages\": 100,\n                \"language\": \"English\",\n\t\t\t\t\"release_date\": \"2000-01-01T00:00:00.000Z\",\n\t\t\t\t\"description\": \"O pequeno príncipe\",\n\t\t\t\t\"details\": \"O pequeno príncipe\",\n                \"poster\": FILE\n            }\n\n+ Response 200 (application/json)\n\n    + Body\n\n           {\n                \"data\": {\n                    \"type\": \"books\",\n                    \"attributes\": {\n                        \"_id\": \"62be2bcfcd31a9205fcee99d\",\n                        \"title\": \"O pequeno príncipe\",\n                        \"slug\": \"o-pequeno-principe\",\n                        \"visible\": true,\n                        \"isbn\": \"978-3-16-148410-0\",\n                        \"volume\": 1,\n                        \"edition\": 1,\n                        \"pages\": 100,\n                        \"language\": \"English\",\n                        \"release_date\": \"2000-01-01T00:00:00.000Z\",\n                        \"description\": \"O pequeno príncipe\",\n                        \"details\": \"O pequeno príncipe\",\n                        \"poster\": \"http://localhost:3000/uploads/ad8a8f1cda416f0bbb633b289283a59f.jpg\",\n                        \"created_at\": \"2022-06-30T23:03:43.136Z\",\n                        \"updated_at\": \"2022-06-30T23:05:21.043Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/books\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n\n+ Response 400 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 400,\n              \"error\": \"Bad Request\",\n              \"message\": \"Invalid request payload input\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }\n            \n### Delete (/books/{slug}) [DELETE]\n\n+ Request (application/json)\n\n    + Headers\n\n            Authorization: Bearer [access_token]\n\n+ Response 200 (application/json)\n\n    + Body\n\n            {\n                \"data\": {\n                    \"type\": \"books\",\n                    \"attributes\": {\n                        \"_id\": \"62be2bcfcd31a9205fcee99d\",\n                        \"title\": \"O pequeno príncipe\",\n                        \"slug\": \"o-pequeno-principe\",\n                        \"visible\": true,\n                        \"isbn\": \"978-3-16-148410-0\",\n                        \"volume\": 1,\n                        \"edition\": 1,\n                        \"pages\": 100,\n                        \"language\": \"English\",\n                        \"release_date\": \"2000-01-01T00:00:00.000Z\",\n                        \"description\": \"O pequeno príncipe\",\n                        \"details\": \"O pequeno príncipe\",\n                        \"poster\": \"http://localhost:3000/uploads/ad8a8f1cda416f0bbb633b289283a59f.jpg\",\n                        \"created_at\": \"2022-06-30T23:03:43.136Z\",\n                        \"updated_at\": \"2022-06-30T23:05:21.043Z\"\n                    }\n                },\n                \"links\": {\n                    \"self\": \"http://localhost:3000/books\"\n                }\n            }\n\n+ Response 401 (application/json)\n\n    + Body\n\n            {\n                \"statusCode\": 401,\n                \"error\": \"Unauthorized\",\n                \"message\": \"Missing authentication\"\n            }\n\n+ Response 404 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 404,\n              \"error\": \"Not Found\",\n              \"message\": \"Not Found\"\n            }\n            \n+ Response 500 (application/json)\n\n    + Body\n\n            {\n              \"statusCode\": 500,\n              \"error\": \"Internal Server Error\",\n              \"message\": \"An internal server error occurred\"\n            }            \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-menezes%2Flibrary-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryan-menezes%2Flibrary-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-menezes%2Flibrary-api/lists"}