diff --git a/api-documentation.md b/api-documentation.md index 28c19b9..1f95d98 100644 --- a/api-documentation.md +++ b/api-documentation.md @@ -274,7 +274,7 @@ A json object for the meeting to delete with `id`. ##### 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`. +``` +[ + { + "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": 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" - } - ] + "id": "f86983db-955e-43b8-be3e-bc92bbeb9b43" } ``` +##### 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 /api/meetings/:id/availibility`** @@ -346,41 +384,40 @@ A json object with a `meeting_id`. ##### 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", - "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": [{ + "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", + "availibility": [{ + "participant_id": 5, + "possible_date_id": 21, + "intervals": [{ "preference": 0, - "start_time": "2021-06-25 08:00:00", - "end_time": "2021-06-25 10:30:00", + "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" + }] + } + ] } + ``` ### **Participants** | `participant` @@ -463,7 +500,6 @@ A json object for the participant with `account_id`, `meeting_id`, `earliest_tim ``` { - "id": 23, "account_id": 5, "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", "earliest_time": "09:30", @@ -492,13 +528,12 @@ A json object for the participant to delete with `token`. ##### 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", - "meeting_title": "Worldwide strategy meeting for growth" +{ + "message": "Meeting with id 1-f86983db-955e-43b8-be3e-bc92bbeb9b43 successfully deleted." } ``` @@ -561,11 +596,9 @@ A json object for the deleted possible date with `id`, `meeting_id` and `possibl ``` { - "data": { - "id": 12, - "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", - "possible_date": "2020-02-18" - } + "id": 12, + "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", + "possible_date": "2020-02-18" } ```