From f9c5eeecf51fe07419d6c37f7b100e13483c258d Mon Sep 17 00:00:00 2001 From: rui hildt Date: Sun, 9 Feb 2020 20:47:45 +0100 Subject: [PATCH] Update docimentation --- README.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5be4179..1d6cef4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ___ **`GET /api/countries/:country_id`** ##### Response -A json object with a list of cities in the selected country `name` and `id` and `country_id`. +An array of json objects with a list of cities in the selected country with `name`, `id` and `country_id`. ``` [ @@ -51,14 +51,16 @@ A json object with a list of cities in the selected country `name` and `id` and **`GET /api/cities`** ##### Response -A json object with `id`, `name` and `country_id`. +An array of json objects with `id`, `name` and `country_id`. ``` -{ - "id": 1, - "name": 'bruges', - "country_id": 1 -} +[ + { + "id": 1, + "name": 'bruges', + "country_id": 1 + } +] ``` ### ROADS **`roads`** @@ -73,15 +75,17 @@ A json object with `id`, `name` and `country_id`. **`GET /api/roads`** ##### Response -A json object with `id`, `start_city_id`, 'end_city_id` and `distance`. +A array of json objects with `id`, `start_city_id`, 'end_city_id` and `distance`. ``` -{ - "id": 1, - "start_city_id": 1, - "end_city_id": 3, - "distance": 50 -} +[ + { + "id": 1, + "start_city_id": 1, + "end_city_id": 3, + "distance": 50 + } +] ``` ### Shortest Path **`cities`**