... | ... | @@ -30,31 +30,92 @@ These *endpoints* are use case methods that have the aim of creating, getting in |
|
|
}
|
|
|
```
|
|
|
|
|
|
#### Obtain information about parkings
|
|
|
#### Obtain information about parkings in a municipalty
|
|
|
|
|
|
- Method: GET
|
|
|
|
|
|
- URL: {baseUrl}/v1/parking/{municipalityIneCode}/{parkingId}
|
|
|
- URL: {baseUrl}/v1/parking/{municipalityIneCode}
|
|
|
|
|
|
- Obtains information from the data of a parking (municipalityIneCode, parkingId, freeCapacity, totalCapacity)
|
|
|
- Response:
|
|
|
|
|
|
```json
|
|
|
[
|
|
|
{
|
|
|
"municipalityIneCode":50297,
|
|
|
"parkingId":1,
|
|
|
"freeCapacity":6,
|
|
|
"totalCapacity":5
|
|
|
"municipalityIneCode": 50297,
|
|
|
"name": "abcd",
|
|
|
"parkingId": "99",
|
|
|
"postalCode": 1,
|
|
|
"address": "abc",
|
|
|
"timetable": "abc",
|
|
|
"totalCapacity": 0,
|
|
|
"geoJsonAddress": {
|
|
|
"type": "Polygon",
|
|
|
"coordinates":[
|
|
|
[
|
|
|
[-0.864299,41.646176],[-0.864162,41.646250],
|
|
|
[-0.864135,41.646412],[-0.864408,41.646432],
|
|
|
[-0.864453,41.646200],[-0.864299,41.646176]
|
|
|
]
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"municipalityIneCode": 50297,
|
|
|
"name": "abcd",
|
|
|
"parkingId": "1",
|
|
|
"postalCode": 1,
|
|
|
"address": "abc",
|
|
|
"timetable": "abc",
|
|
|
"totalCapacity": 5,
|
|
|
"freeCapacity": 4,
|
|
|
"geoJsonAddress": {
|
|
|
"type": "Polygon",
|
|
|
"coordinates":[
|
|
|
[
|
|
|
[-0.864299,41.646176],[-0.864162,41.646250],
|
|
|
[-0.864135,41.646412],[-0.864408,41.646432],
|
|
|
[-0.864453,41.646200],[-0.864299,41.646176]
|
|
|
]
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
|
|
|
*<u>Note:</u> In the GET method URL, it is not necessary to specify the parking identification number ({baseUrl} / v1 / parking / {municipalityIneCode}) or the municipality code ({baseUrl} / v1 / parking)*
|
|
|
#### Obtain information about a parking
|
|
|
|
|
|
- Method: GET
|
|
|
|
|
|
- URL: {baseUrl}/v1/parking/{municipalityIneCode}/{parkingId}
|
|
|
|
|
|
- Response:
|
|
|
|
|
|
```json
|
|
|
[
|
|
|
{
|
|
|
"municipalityIneCode": 50297,
|
|
|
"name": "abcd",
|
|
|
"parkingId": "1",
|
|
|
"postalCode": 1,
|
|
|
"address": "abc",
|
|
|
"timetable": "abc",
|
|
|
"totalCapacity": 0,
|
|
|
"geoJsonAddress": {
|
|
|
"type": "Polygon",
|
|
|
"coordinates":[
|
|
|
[
|
|
|
[-0.864299,41.646176],[-0.864162,41.646250],
|
|
|
[-0.864135,41.646412],[-0.864408,41.646432],
|
|
|
[-0.864453,41.646200],[-0.864299,41.646176]
|
|
|
]
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
|
|
|
#### Delete parking
|
|
|
|
|
|
- Method: DEL
|
|
|
|
|
|
- URL: {baseUrl}/v1/parking/{municipalityIneCode}/{parkingId} |
|
|
|
|
|
- Delete the data of a parking |