API Documentation - ZhiqiLinn/airVnb GitHub Wiki

API-Routes

Listings

  • As a logged in user, I want to be able to edit and delete a listing by clicking on the ‘Edit’ or ‘Delete’ button associated with the listings without causing a refresh/redirect.
  • GET /user/:id/listings

Read all user listings

  • GET /listings

Read all listings

  • GET /listings/:id

Read one listing

  • POST /listings

Post a listing

  • PUT /listings/:id

Edit a listing

  • DELETE /listings/:id

Delete a listing

Bookings

  • As a logged in user, I want to be able to edit and delete a booking by clicking on the ‘Edit’ or ‘Delete’ button associated with the bookings without causing a refresh/redirect.
  • GET /user/:id/bookings

Read all user bookings

  • GET /bookings/:id

Read one booking

  • POST /bookings

Post a booking

  • PUT /bookings/:id

Edit a booking

  • DELETE /bookings/:id

Delete a booking