This is an API built with ruby on rails for tracking pizzas restaurants.
The following endpoints are available;
-
GET
/restaurants- retrieve all restaurants. -
GET
/restaurants/:id- retrieve one restaurant by its id. -
DELETE
/restaurants/:id- delete restaurant by its id along with anyRestaurantPizzas that are associated with it -
GET
/pizzas- retrieve all pizzas -
POST
/restaurant_pizzas- create a new instance ofRestaurantPizza
The endpoint should be included at the end of the main url https://manenepizza.onrender.com. For example to retrieve all restaurants, the url will be https://manenepizza.onrender.com/restaurants.
-
Step 1: Clone this repo to your local environment.
git@github.com:ntwigamartin/Pizza_Restaurant_API.git -
Step 2: Navigate to the cloned repository and run the following command to open it on your editor;
code . -
Step 3: Install the dependencies using;
Bundle install -
Step 4: run the migrations & seed data using;
rails db:migrate db:seed -
Step 4: Start the application using;
rails s
NB: You require a code editor(e.g vs code) and an API client(e.g Thunder client or Postman) to run the API locally.
- Martin Ntwiga