yoshelb / mod-4-portfolio-project

0 stars 0 forks source link

Mod 4 Portfolio Project

Database Schema Design

Airbnb Database Schema

API Documentation

USER AUTHENTICATION/AUTHORIZATION

All endpoints that require authentication

All endpoints that require a current user to be logged in.

All endpoints that require proper authorization

All endpoints that require authentication and the current user does not have the correct role(s) or permission(s).

Get the Current User

Returns the information about the current user that is logged in.

Log In a User

Logs in a current user with valid credentials and returns the current user's information.

Sign Up a User

Creates a new user, logs them in as the current user, and returns the current user's information.

SPOTS

Get all Spots

Returns all the spots.

Get all Spots owned by the Current User

Returns all the spots owned (created) by the current user.

Get details of a Spot from an id

Returns the details of a spot specified by its id.

Create a Spot

Creates and returns a new spot.

Add an Image to a Spot based on the Spot's id

Create and return a new image for a spot specified by id.

Edit a Spot

Updates and returns an existing spot.

Delete a Spot

Deletes an existing spot.

REVIEWS

Get all Reviews of the Current User

Returns all the reviews written by the current user.

Get all Reviews by a Spot's id

Returns all the reviews that belong to a spot specified by id.

Create a Review for a Spot based on the Spot's id

Create and return a new review for a spot specified by id.

Add an Image to a Review based on the Review's id

Create and return a new image for a review specified by id.

Edit a Review

Update and return an existing review.

Delete a Review

Delete an existing review.

BOOKINGS

Get all of the Current User's Bookings

Return all the bookings that the current user has made.

Get all Bookings for a Spot based on the Spot's id

Return all the bookings for a spot specified by id.

Create a Booking from a Spot based on the Spot's id

Create and return a new booking from a spot specified by id.

Edit a Booking

Update and return an existing booking.

Delete a Booking

Delete an existing booking.

IMAGES

Delete a Spot Image

Delete an existing image for a Spot.

Delete a Review Image

Delete an existing image for a Review.

Add Query Filters to Get All Spots

Return spots filtered by query parameters.