This API contains local restaurants and reviews.
- Click here to get started!
- Clone repository.
- Enter project root directory and type "bundle install" to install all necessary gems.
- Type "rake db:create" to create the databases.
- Type "rake db:seed" to seed the products and reviews
- Sign into Postman to test API calls"
*Please note the ":restaurant_id" and ":id" are placeholders for ID number
Behavior | Route Input | Output |
---|---|---|
GET all restaurants | localhost:3000/v1/restaurants | Returns all restaurants |
POST a restaurant | localhost:3000/v1/restaurants | Create a new restaurant |
UPDATE a restaurant | localhost:3000/v1/restaurants/:id | Updates restaurant |
DELETE a restaurant | localhost:3000/v1/restaurants/:id | Deletes restaurant off the list |
GET reviews for a restaurant | localhost:3000/v1/restaurants/:restaurant_id/reviews | Returns all reviews for the restaurant |
GET specific review for a restaurant | localhost:3000/v1/restaurants/:restaurant_id/reviews/:id | Returns a review for a restaurant |
POST review for a restaurant | localhost:3000/v1/restaurants/:restaurant_id/reviews/ | Creates a review for a restaurant |
UPDATE a review for a restaurant | localhost:3000/v1/restaurants/:restaurant_id/reviews/:id | Updates current restaurant |
DELETE a review for a restaurant | localhost:3000/v1/restaurants/:restaurant_id/reviews/:id | Deletes restaurant review |
GET a random restaurant | localhost:3000/v1/restaurants/random | Returns a randomized restaurant from database |
GET a restaurant by origin parameter search | localhost:3000/v1/restaurants/origin?=Greek | Returns all restaurants with the origin "Greek" |
- No known bugs
If you have any questions, concerns, or suggestions, please contact me at Garlandlai24@gmail.com
- Github
- Ruby on Rails
- PostMan
- Gems: Shoulda-matchers, Faker, rspec-rails, Factory_bot, and others
This webpage is licensed under the MIT license.
Copyright (c) 2019 Garland Lai