Add list of availibility for a meeting endpoint

This commit is contained in:
rui hildt 2020-04-06 19:06:30 +02:00
parent 8a11a3b779
commit dccde7fdc2
1 changed files with 78 additions and 29 deletions

View File

@ -293,36 +293,85 @@ A json object for the specified meeting with an array of `participant`.
```
{
"status": 200,
"data": [
{
"id": 23,
"account_id": 5,
"meeting_id": "worldwide-strategy-meeting-for-11059",
"earliest_time": "09:30 AM",
"latest_time": "05:00 PM",
"quorum": 1,
"mandatory": 1,
"host": 1,
"answered": 1,
"timezone": "Europe/Brussels"
},
{
"id": 28,
"account_id": 11,
"meeting_id": "worldwide-strategy-meeting-for-11059",
"earliest_time": "10:00 AM",
"latest_time": "09:00 PM",
"quorum": 0,
"mandatory": 1,
"host": 0,
"answered": 1,
"timezone": "Europe/Brussels"
}
]
"status": 200,
"data": [{
"id": 23,
"account_id": 5,
"meeting_id": "worldwide-strategy-meeting-for-11059",
"earliest_time": "09:30 AM",
"latest_time": "05:00 PM",
"quorum": 1,
"mandatory": 1,
"host": 1,
"answered": 1,
"timezone": "Europe/Brussels"
},
{
"id": 28,
"account_id": 11,
"meeting_id": "worldwide-strategy-meeting-for-11059",
"earliest_time": "10:00 AM",
"latest_time": "09:00 PM",
"quorum": 0,
"mandatory": 1,
"host": 0,
"answered": 1,
"timezone": "Europe/Brussels"
}
]
}
```
#### Get a list of complete availibility for a meeting
**`GET /api/meetings/:id/availibility`**
##### Request
A json object with a `meeting_id`.
```
{
"id": "worldwide-strategy-meeting-for-11059"
}
```
##### Response
A json object for the specified meeting with an array of `participant`.
```
{
"status": 200,
"data": {
"meeting_id": "worldwide-strategy-meeting-for-11059",
"availibility": [{
"participant_id": 5,
"possible_date_id": 21,
"intervals": [{
"preference": 0,
"start_time": "2021-06-25 09:00:00",
"end_time": "2021-06-25 13:00:00",
"timezone": "Europe/Brussels"
},
{
"preference": 1,
"start_time": "2021-06-25 15:00:00",
"end_time": "2021-06-25 20:00:00",
"timezone": "Europe/Brussels"
}]
},
{
"participant_id": 56,
"possible_date_id": 21,
"intervals": [{
"preference": 0,
"start_time": "2021-06-25 08:00:00",
"end_time": "2021-06-25 10:30:00",
"timezone": "Europe/Brussels"
}]
}
]
}
}
```
### **Possible Dates** | `possible_date`
| field | data type | metadata |
@ -509,7 +558,7 @@ A json object for the deleted participant with status code and message.
GET / DELETE / UPDATE
#### Add an availibility
#### Add an availibility for a possible date
**`POST /api/availibility`**
##### Request
@ -564,7 +613,7 @@ A json object with the availibility to add with **`participant_id`**, **`possibl
}
```
#### Delete availibility for a date
#### Delete availibility for a possible date
**`DELETE /api/availibility/:id`**
##### Request