Add endpoint to get possible dates for a meeting

This commit is contained in:
rui hildt 2020-05-05 11:24:16 +02:00
parent f6921c0e75
commit 0c29a59fe3

View File

@ -274,7 +274,7 @@ A json object for the meeting to delete with `id`.
##### Response `200` ##### Response `200`
A json object for the deleted meeting with `id` and `meeting_title`. A json object for the deleted meeting with `message`.
``` ```
{ {
@ -300,36 +300,74 @@ A json object with a `meeting_id`.
A json object for the specified meeting with an array of `participant`. A json object for the specified meeting with an array of `participant`.
```
[
{
"id": 23,
"account_id": 5,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"earliest_time": "09:30",
"latest_time": "17:00",
"quorum": 1,
"mandatory": 1,
"host": 1,
"answered": 1,
"timezone": "Europe/Brussels"
},
{
"id": 28,
"account_id": 11,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"earliest_time": "10:00",
"latest_time": "21:00",
"quorum": 0,
"mandatory": 1,
"host": 0,
"answered": 1,
"timezone": "Europe/Brussels"
}
]
```
#### Get a list of all possible dates for a meeting
**`GET /api/meetings/:id/possible-dates`**
##### Request
A json object with a `meeting_id`.
``` ```
{ {
"data": [{ "id": "f86983db-955e-43b8-be3e-bc92bbeb9b43"
"id": 23,
"account_id": 5,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"earliest_time": "09:30",
"latest_time": "17:00",
"quorum": 1,
"mandatory": 1,
"host": 1,
"answered": 1,
"timezone": "Europe/Brussels"
},
{
"id": 28,
"account_id": 11,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"earliest_time": "10:00",
"latest_time": "21:00",
"quorum": 0,
"mandatory": 1,
"host": 0,
"answered": 1,
"timezone": "Europe/Brussels"
}
]
} }
``` ```
##### Response `200`
A json object for the specified meeting with an array of `possible_date`.
```
[
{
"id": 12,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"possible_date": "2020-02-18"
},
{
"id": 13,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"possible_date": "2020-02-19"
},
{
"id": 14,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"possible_date": "2020-02-22"
}
]
```
#### Get a list of complete availibility for a meeting #### Get a list of complete availibility for a meeting
**`GET /api/meetings/:id/availibility`** **`GET /api/meetings/:id/availibility`**
@ -346,41 +384,40 @@ A json object with a `meeting_id`.
##### Response `200` ##### Response `200`
A json object for the specified meeting with an array of `participant`. A json object for the specified meeting with `meeting_id` and an array of `availibility`.
``` ```
{ {
"data": { "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", "availibility": [{
"availibility": [{ "participant_id": 5,
"participant_id": 5, "possible_date_id": 21,
"possible_date_id": 21, "intervals": [{
"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, "preference": 0,
"start_time": "2021-06-25 08:00:00", "start_time": "2021-06-25 09:00:00",
"end_time": "2021-06-25 10:30: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" "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"
}]
}
]
} }
``` ```
### **Participants** | `participant` ### **Participants** | `participant`
@ -463,7 +500,6 @@ A json object for the participant with `account_id`, `meeting_id`, `earliest_tim
``` ```
{ {
"id": 23,
"account_id": 5, "account_id": 5,
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"earliest_time": "09:30", "earliest_time": "09:30",
@ -492,13 +528,12 @@ A json object for the participant to delete with `token`.
##### Response ##### Response
A json object for the deleted participant with `participant_username`, `participant_username` and `meeting_title`. A json object for the deleted participant with `message`.
``` ```
{ {
"participant_username": "Sylvia", {
"participant_email": "sylvia@email.com", "message": "Meeting with id 1-f86983db-955e-43b8-be3e-bc92bbeb9b43 successfully deleted."
"meeting_title": "Worldwide strategy meeting for growth"
} }
``` ```
@ -561,11 +596,9 @@ A json object for the deleted possible date with `id`, `meeting_id` and `possibl
``` ```
{ {
"data": { "id": 12,
"id": 12, "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", "possible_date": "2020-02-18"
"possible_date": "2020-02-18"
}
} }
``` ```