Skip to content

airSDC/Reviews-Service

 
 

Repository files navigation

Project Name

Project description

Related Projects

Table of Contents

  1. Usage
  2. Requirements
  3. Development

Usage

Some usage instructions

Requirements

An nvmrc file is included if using nvm.

  • Node 6.13.0
  • etc

Development

Installing Dependencies

From within the root directory:

npm install -g webpack
npm install

CRUD API

GET: Use the '/rooms/:roomId/reviews' endpoint to access get all the reviews for one room, where :roomId is the ID of the room you are interested in POST: Use the '/rooms/:roomId/reviews' endpoint to add a review to a room, where :roomId is the ID of the room you are interested in In the request body, use this format for your new review:

    {
    "room_id": 5,
    "user": "Jeremy",
    "created_at": "August 2018",
    "review_text": "Sed et consequuntur itaque natus amet minus.",
    "image_url": "https://s3-us-west-1.amazonaws.com/airfecuserimages/randPeopleImages/randPerson2.jpeg",
    "accuracy_rating": 3,
    "communication_rating": 5,
    "cleanliness_rating": 3,
    "location_rating": 2,
    "check_in_rating": 4,
    "value_rating": 4,
    "is_reported": true,
    "__v": 0
  }

PUT: Use the '/rooms/:roomId/reviews/:reviewToUpdate' endpoint to update a review for a room, where :roomId is the ID of the room you are interested in and :reviewToUpdate is the ID of the review you would like to Update DELETE: Use the 'rooms/:roomId/reviews/:reviewToDelete' endpoint to delete a review for a room, where :roomId is the ID of the room you are interested in and :reviewToDelete is the ID of the review you would like to delete

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.0%
  • CSS 9.5%
  • HTML 1.5%