update readme

This commit is contained in:
sbriat 2023-07-26 17:05:16 +02:00
parent 1fd0530dc2
commit 218595553d
1 changed files with 31 additions and 22 deletions

View File

@ -56,7 +56,7 @@ The app exposes the following [gRPC](https://grpc.io/) services :
}
```
- **Create** : create an ad (note that id is optional, an id (as a uuid) will be automatically attributed if it is not provided)
- **Create** : create an ad
Punctual driver ad :
@ -68,9 +68,12 @@ The app exposes the following [gRPC](https://grpc.io/) services :
"frequency": "PUNCTUAL",
"fromDate": "2023-01-15",
"toDate": "2023-01-15",
"schedule": {
"thu": "09:00"
},
"schedule": [
{
"time": "09:00",
"margin": 900
}
],
"waypoints": [
{
"position": 0,
@ -106,9 +109,12 @@ The app exposes the following [gRPC](https://grpc.io/) services :
"frequency": "PUNCTUAL",
"fromDate": "2023-01-15",
"toDate": "2023-01-15",
"schedule": {
"thu": "09:00"
},
"schedule": [
{
"time": "09:00",
"margin": 900
}
],
"waypoints": [
{
"position": 0,
@ -142,11 +148,20 @@ The app exposes the following [gRPC](https://grpc.io/) services :
"frequency": "RECURRRENT",
"fromDate": "2023-01-15",
"toDate": "2023-12-31",
"schedule": {
"mon": "07:00",
"tue": "07:05",
"fri": "07:10"
},
"schedule": [
{
"day": 1,
"time": "07:00"
},
{
"day": 2,
"time": "07:05"
},
{
"day": 5,
"time": "07:10"
}
],
"waypoints": [
{
"position": 0,
@ -172,22 +187,16 @@ The app exposes the following [gRPC](https://grpc.io/) services :
The list of possible options when creating an ad :
- id (optional): the id of the ad (as a uuid)
- userId: the user id (as a uuid)
- driver (boolean, optional): if the ad is a driver ad
- passenger (boolean, optional): if the ad is a passenger ad
- frequency: `PUNCTUAL` or `RECURRENT`
- fromDate: start date for recurrent ad, carpool date for punctual ad
- toDate: end date for recurrent ad, same as fromDate for punctual ad
- schedule: an object with the departure time for each carpooled day in the week (only the carpooled day for punctual ad)
- marginDurations (optional): an object with the margin duration (in seconds) for each carpooled day in the week, eg:
{
"mon": 900,
"tue": 850,
"fri": 950
}
- schedule: an array of schedule items, as schedule item containing :
- the week day as a number, from 0 (sunday) to 6 (saturday) if the ad is recurrent
- the departure time (as HH:MM)
- the margin around the departure time in seconds (optional)
- seatsProposed (optional): number of seats proposed as driver
- seatsRequested (optional): number of seats requested as passenger
- strict (boolean, optional): if set to true, allow matching only with similar frequency ads