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

View File

@ -293,36 +293,85 @@ A json object for the specified meeting with an array of `participant`.
``` ```
{ {
"status": 200, "status": 200,
"data": [ "data": [{
{ "id": 23,
"id": 23, "account_id": 5,
"account_id": 5, "meeting_id": "worldwide-strategy-meeting-for-11059",
"meeting_id": "worldwide-strategy-meeting-for-11059", "earliest_time": "09:30 AM",
"earliest_time": "09:30 AM", "latest_time": "05:00 PM",
"latest_time": "05:00 PM", "quorum": 1,
"quorum": 1, "mandatory": 1,
"mandatory": 1, "host": 1,
"host": 1, "answered": 1,
"answered": 1, "timezone": "Europe/Brussels"
"timezone": "Europe/Brussels" },
}, {
{ "id": 28,
"id": 28, "account_id": 11,
"account_id": 11, "meeting_id": "worldwide-strategy-meeting-for-11059",
"meeting_id": "worldwide-strategy-meeting-for-11059", "earliest_time": "10:00 AM",
"earliest_time": "10:00 AM", "latest_time": "09:00 PM",
"latest_time": "09:00 PM", "quorum": 0,
"quorum": 0, "mandatory": 1,
"mandatory": 1, "host": 0,
"host": 0, "answered": 1,
"answered": 1, "timezone": "Europe/Brussels"
"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` ### **Possible Dates** | `possible_date`
| field | data type | metadata | | field | data type | metadata |
@ -509,7 +558,7 @@ A json object for the deleted participant with status code and message.
GET / DELETE / UPDATE GET / DELETE / UPDATE
#### Add an availibility #### Add an availibility for a possible date
**`POST /api/availibility`** **`POST /api/availibility`**
##### Request ##### 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`** **`DELETE /api/availibility/:id`**
##### Request ##### Request