Skip to content

BookifyUdL/BookifyBack

Repository files navigation

API Documentation

UML Diagram:

Bookify UML

Steps to execute server

1. Clone the project to your computer(via HTTPS or SSH)

2. Download Node.js

3. Download all project dependencies

You must be inside the project and then execute the following instruction: npm install --save

4.Run the server

You must be inside the project and then execute the following instruction: npm start

IMPORTANT: Whenever you change something on the server you just have to save and it reuploads it automatically.

API EndPoints

Global End Point: https://localhost:3000/ Entities End Points:

{
  "Achievements": "https://localhost:3000/achievements",
  "Admins": "https://localhost:3000/admins",
  "Authors": "https://localhost:3000/authors",
  "Books": "https://localhost:3000/books",
  "Comments": "https://localhost:3000/comment",
  "Genres": "https://localhost:3000/genres",
  "Items": "https://localhost:3000/items",
  "Reviews": "https://localhost:3000/reviews",
  "Shops": "https://localhost:3000/shops",
  "Statistics": "https://localhost:3000/statistics",
  "Users": "https://localhost:3000/users"
}

API examples (POST, GET, PATCH, DELETE)

This are just examples, try the other endpoints on your own.

POST

Send POST to the endpoint https://localhost:3000/genres to create a resource. Body:

  {
    "name": "Java"
  }

GET

Send GET to the endpoint: https://localhost:3000/genres to get all resources. Body: None

Send GET to the endpoint: https://localhost:3000/genres/:genreId to get a specific resource. (id --> entity id value) Body: None

PATCH

Send PATCH to the endpoint: https://localhost:3000/genres/:genreId to update/modify a specific resource. (id --> entity id value)

[
  {
    "propName":"name", "value": "Adventure"
  }
]

IMPORTANT: Add as much lines as properties of that entity you want to change.

Send PATCH to the endpoint: https://localhost:3000/genres/update/:genreId to update/modify a specific resource, giving values to each property of the entity. (id --> entity id value)

DELETE

Send DELETE to the endpoint: https://localhost:3000/genres/:genreId to delete a specific resource. (id --> entity id value) Body: None

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •