-
Notifications
You must be signed in to change notification settings - Fork 1
API Spec
Mars Tan edited this page Apr 12, 2019
·
7 revisions
{
"user": {
"id": "",
"name": "Tommy Trojan",
"token": "",
"username": "trojan.echo",
"email": "[email protected]",
"avatar": null
}
}
{
"id": "",
"name": "Team Echo",
"description": "",
"color": "green",
"members": [{
"name": "Tommy Trojan",
"username": "trojan.echo",
"email": "[email protected]",
"avatar": null
}, {
"name": "Mars Tan",
"username": "mars.tanjx",
"email": "[email protected]",
"avatar": null
}]
}
{
"id": "",
"title": "",
"time": "1553479225106",
"location": "TTH 110",
"invitees": [{
"name": "Tommy Trojan",
"username": "trojan.echo",
"email": "[email protected]",
"avatar": null
},
{
"name": "Mars Tan",
"username": "mars.tanjx",
"email": "[email protected]",
"avatar": null
}],
"agendas": [],
"team": {
"id": "",
"name": "Team Echo",
"color": "green",
"description": "",
"members": [{
"name": "Tommy Trojan",
"username": "trojan.echo",
"email": "[email protected]",
"avatar": null
},
{
"name": "Mars Tan",
"username": "mars.tanjx",
"email": "[email protected]",
"avatar": null
}]
},
"start": "1553479225106",
"end": "1553480225106"
}
{
"id": "",
"title": "",
"description": "",
"notes": "",
"tasks": [{
"id": "",
"name": "",
"description": "",
"due": "1553479225106",
"status": "1"
}]
}
{
"id": 1,
"name": "Finish A11",
"description": "need to finish",
"due": 1553479225106,
"status": 1,
"assignees":[{
"name": "Tommy Trojan",
"username": "trojan.echo",
"avatar": "https://randomuser.me/api/portraits/thumb/women/65.jpg"
}, {
"name": "Mars Tan",
"username": "mars.tanjx",
"avatar": "https://randomuser.me/api/portraits/thumb/men/62.jpg"
}],
"team":{
"id": 1,
"color":"blue",
"name": "Team Echo",
"description": "This team isn't even real.",
"members": [{
"name": "Tommy Trojan",
"username": "trojan.echo",
"avatar": "https://randomuser.me/api/portraits/thumb/women/65.jpg"
},
{
"name": "Mars Tan",
"username": "mars.tanjx",
"avatar": "https://randomuser.me/api/portraits/thumb/men/62.jpg"
}]
}
}
// statuses: 1 = upcoming, 2 = in progress, 3 = complete
If a request fails any validations, expect a 422 and errors in the following format:
{
"errors":{
"body": [
"can't be empty"
]
}
}
401 for Unauthorized requests, when a request requires authentication but it isn't provided
403 for Forbidden requests, when a request may be valid but the user doesn't have permissions to perform the action
404 for Not found requests, when a resource can't be found to fulfill the request