#Project A
##API
API-url: https://teamgctof.multimediatechnology.be/api
For accessing the API you need the
[appSecret]
###Authentication
Fetch a JSON Web Token and the user
Check to see if possible to create own jwt in unity
####GET /get/login
| Parameters | |
|---|---|
| [string email] | |
| password | [string password] |
| secret | [string appSecret] |
| Response | |
| Success |
{
"status":"ok",
"token":"[string token]",
"user":{
"id": "[int id]",
"email": "[string email]",
"firstname": "[string firstname]",
"lastname": "[string lastname",
"postal_code": "[string postalCode]",
"city": "[string city]",
"is_admin": "[tinyint isAdmin]",
"created_at": "[date created_at]",
"updated_at": "[date updated_at]"
},
}Failure
{
"status":"error",
"error": "[string errorText]"
}###Project
Fetch all the projects and phases
####GET /get/projects
| Parameters | |
|---|---|
| secret | [string appSecret] |
| Response | |
| Success |
"status": "ok", "projects": [ { "id": "[int projectId]", "name": "[string projectName]", "description": "[string projectDescription]", "address": "[string projectAddress]", "photo_path": "[string projectRelativePathToPicture]", "photo_left_offset": "[string projectPictureOffset (Ex.: -12px)]", "latitude": "[string projectLatitude]", "longitude": "[string projectLongitude]", "created_at": "[date createProjectdAt]", "updated_at": "[date updatedProjectAt]", "phases": [ { "id": "[int phaseId]", "name": "[string phaseName]", "description": "[string description]", "start": "[date startDatePhase]", "end": "[date endDatePhase]", "parentHeight": "[string heightOfContainer (Ex.: 255px)]", "created_at": "[date createPhaseAt]", "updated_at": "[date updatedPhaseAt]", } ] } ]
Failure
{
"status":"error",
"error": "[string errorText]"
}###Ignored Words
Add or remove words for statistics
####POST /post/statistics/word
| Parameters | |
|---|---|
| word | [string newWord] |
Authorization
| Header | Content |
|---|---|
| Authorization | Bearer [string token] |
Token is a JWT
This is a refresh token, so in a success response their is a new Authorization header
Response
Success
| Header | Content |
|---|---|
| Authorization | Bearer [string token] |
| Failure |
{
"status":"error",
"error": "[string errorText]"
}