-
Notifications
You must be signed in to change notification settings - Fork 18
Schedule
this path goes under /schedule/
Reference from Google Calendar API https://developers.google.com/calendar/api/v3/reference ACL = access control list
This is the schedule homepage which we call ‘calendar page’
GET /
| Parameter | Type | Description |
|---|---|---|
| calendar_id | String | calendar for every user (each user will each have a calendar id) |
| event_id | String | the event that show up for today date (today’s event) |
| isSelect | boolean | use to if user click select the date. The default is False. |
Example
{
“calendar_id”: “cid1628911”
“event_id”: “ev11288910”
“isSelect”: “False”,
}
This page is show event of the one day
GET /
| Parameter | Type | Description |
|---|---|---|
| table_id | String | The timetable of each day |
| event_id | String | Events are shown on the selected date |
| isSelect_date | boolean | Use to if user click select the date. The default is False |
| isSelect_event | boolean | Use to if user click select the event. The default is False |
Example
{
“table_id”: “tid1628911”
“event_id”: “ev11288910”
“isSelect_date”: “False”
“isSelect_event”: “False”
}
user create new event
POST/addnewevent
| Parameter | Type | Description |
|---|---|---|
| name | String | Event’s name |
| description | String | Event’ description |
| starttime | DateTime | Event start time |
| endtime | DateTime | Event end time |
| completeForm | Boolean | User has completed the form to add event |
Example
{
name: “Shortest path”
description: “Find shortest path”
startTime: “11:00”,
endTime: “23:59”
"completeForm":true
}
Response
201 Add event success
| Parameter | Type | Description |
|---|---|---|
| name | String | Event’s name |
| description | String | Event’ description |
| starttime | DateTime | Event start time |
| endtime | DateTime | Event end time |
| status | Object | Status of request |
| code | int | Http code of request |
| message | int | Response of request |
Example
{
“showevent|:[
{
“name”: “Tum boon”
“Description”:”Wan Pra”
“starttime”:”06:00”
“endtime”:”07:00”
}
],
{
“status”:{
“code”:201,
“message”: “Add event success”
}
}
Response
400 Failed to add event
| Parameter | Type | Description |
|---|---|---|
| status | object | Status of request |
| code | int | Http code of request |
| message | String | Response message |
Example
{
“status”:{
“code”:400,
“message”: “failed to add event”
}
}
user edit event
POST/edit
| Parameter | Type | Description |
|---|---|---|
| name | String | Event’s name |
| description | String | Event’ description |
| starttime | DateTime | Event start time |
| endtime | DateTime | Event end time |
Example
{
name: “Shortest path”
description: “Find shortest path”
startTime: “11:00”,
endTime: “23:59”
}
Response
201 Edit event success
| Parameter | Type | Description |
|---|---|---|
| name | String | Event’s name |
| description | String | Event’ description |
| starttime | DateTime | Event start time |
| endtime | DateTime | Event end time |
| status | Object | Status of request |
| code | int | Http code of request |
| message | int | Response of request |
Example
{
“showevent|:[
{
“name”: “Tum boon”
“Description”:”Wan Pra”
“starttime”:”06:00”
“endtime”:”07:00”
}
],
{
“status”:{
“code”:201,
“message”: “Edit event success”
}
}
Response
400 Failed to edit event
| Parameter | Type | Description |
|---|---|---|
| status | object | Status of request |
| code | int | Http code of request |
| message | String | Response message |
Example
{
“status”:{
“code”:400,
“message”: “failed to edit event”
}
}
get event that user create
GET/ showevent
No request body
Response
200 Show event success
| Parameter | Type | Description |
|---|---|---|
| name | String | event name |
| description | String | event description |
| Starttime | DateTime | event’s start time |
| Endtime | DateTime | event’s end time |
| status | Object | Status of request |
| message | String | Response message |
Example
{
“showevent|:[
{
“name”: “Tum boon”
“Description”:”Wan Pra”
“starttime”:”06:00”
“endtime”:”07:00”
}
],
“status”:{
“code”: 200,
“message”:”Show event success”
}
}
Response
404 Event not found
| Parameter | Type | Description |
|---|---|---|
| status | object | Status of request |
| code | int | Http code of request |
| message | String | Response message |
Example
{
“status”:{
“code”:404,
“message”: “Event not found.”
}
}
delete the selected event
‘DELETE/ event”
| Parameter | Type | Description |
|---|---|---|
| isDeleted | Boolean | Set the value to True |
Example { "isDeleted":true }
Response
‘200’ delete event success
| Parameter | Type | Description |
|---|---|---|
| status | Object | Status of request |
| message | String | Response message |
Example { “status”:{ “code”: 200, “message”:”Delete event success” }
‘404’ selected event not found
| Parameter | Type | Description |
|---|---|---|
| status | object | Status of request |
| code | int | Http code of request |
| message | String | Response message |
Example { “status”:{ “code”:400, “message”: “Selected event not found.” } }