Correct documentation
This commit is contained in:
parent
35e2dcb8da
commit
51e4989174
27
README.md
27
README.md
@ -15,24 +15,37 @@ ___
|
||||
| name | string | |
|
||||
|
||||
#### Get countries list
|
||||
**`GET /api/countries`**
|
||||
**`GET /api/countries/:country_id`**
|
||||
|
||||
##### Response
|
||||
A json object with the `name` and `id`.
|
||||
A json object with the `name` and `id` and `country_id`.
|
||||
|
||||
```
|
||||
{
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Belgium"
|
||||
}
|
||||
"name": "bruges",
|
||||
"country_id": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "antwerp",
|
||||
"country_id": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "ghent",
|
||||
"country_id": 1
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
### CITIES | **`cities`**
|
||||
| field | data type | metadata |
|
||||
| :--------| :--------------------- | :-------------------------------------------------- |
|
||||
| :----------| :--------------------- | :-------------------------------------------------- |
|
||||
| id | unsigned integer | primary key, auto-increments, generated by database |
|
||||
| name | string | |
|
||||
| integer | unsigned integer | foreign key referencing `countries.id` |
|
||||
| country_id | unsigned integer | foreign key referencing `countries.id` |
|
||||
|
||||
#### Get cities list
|
||||
**`GET /api/cities`**
|
||||
|
Loading…
Reference in New Issue
Block a user