URL : /api/user
Method : GET
Auth required : YES
Header constraints
{
"Authorization": "Bearer __JWT__"
}
Code : 200 OK
Content examples
{
"id": 1,
"name": "mmuster",
"email": "[email protected]",
"balance": 1000000,
"created_at": "2021-12-06T13:12:10.000000Z",
"updated_at": "2021-12-06T13:12:10.000000Z"
}
URL: /api/user
Method: POST
Auth required: No
Data constraints
{
"name": "mmuster",
"email": "[email protected]",
"password": "start_01",
"password_confirmation": "start_01"
}
Code : 200 OK
Content examples
{
"message": "User successfully registered",
"user": {
"id": 3,
"name": "mmuster",
"email": "[email protected]",
"balance": "1000000",
"created_at": "2021-12-06T13:29:05.000000Z",
"updated_at": "2021-12-06T13:29:05.000000Z"
}
}
URL : /api/user
Method : PUT
Auth required : YES
Header constraints
{
"Authorization": "Bearer __JWT__"
}
Data constraints
{
"name": "mmuster",
"email": "[email protected]",
"x_axis": 1,
"y_axis": 0
}
Code : 200 OK
Content examples
{
"message": "User changed successfully.",
"user": {
"id": 1,
"name": "mmuster",
"email": "[email protected]",
"balance": 1000000,
"created_at": "2021-12-06T13:12:10.000000Z",
"updated_at": "2021-12-06T13:39:38.000000Z"
}
}
OR Validation Error
{
"name": [
"The name has already been taken."
],
"email": [
"The email has already been taken."
]
...
...
...
}
URL : /api/user
Method : DELETE
Auth required : YES
Header constraints
{
"Authorization": "Bearer __JWT__"
}
Code : 200 OK
Content examples
{
"message": "User successfully deleted"
}
URL : /api/user/resetAll
Method : POST
Auth required : YES
Es wird die Balance des Users auf den Startwert zurückgesetzt, alle Transaktionen und Favoriten des Users werden gelöscht.
Header constraints
{
"Authorization": "Bearer __JWT__"
}
Code : 200 OK
Content examples
{
"message": "User reseted successfully"
}
wird automatisch zurückgesetzt und das neue Password an die genannte Emailadresse gesendet
URL : /api/user/password/reset
Method : POST
Auth required : NO
Data constraints
{
"email": "[email protected]"
}
Code : 200 OK
Content examples
{
"message": "Password reseted successfully"
}
URL : /api/user/password
Method : PUT
Auth required : YES
Header constraints
{
"Authorization": "Bearer __JWT__"
}
Data constraints
{
"password": "start_01",
"new_password": "start_02",
"new_password_confirmation": "start_02"
}
Code : 200 OK
Content examples
{
"message": "Password changed successfully."
}
OR Validation Error
{
"field_name": [
"The given password doesn't match with old password."
],
"password": [
"The password field is required."
],
"password": [
"The given password doesn't match with old password."
],
"new_password": [
"The new password field is required."
],
"new_password": [
"The new password must be at least 6 characters."
],
"new_password": [
"The new password confirmation does not match."
]
...
...
...
}
Der Parameter favorite
lässt eine Einschränkung über den Key is_favorite
des Objekts durchführen Ohne den
Parameter favorite
wird eine 100% Liste zurückgegeben sowohl is_favorite
= true
und false
ist enthalten.
URL : /api/user/favorites?favorite=1
Method : GET
Auth required : YES
Header constraints
{
"Authorization": "Bearer __JWT__"
}
Data constraints
{
"favorite": "0 OR 1 OR WITHOUT"
}
Code : 200 OK
Content examples
[
{
"id": 1,
"name": "Bitcoin",
"symbol": "BTCUSDT",
"is_favorite": true
},
{
"id": 2,
"name": "Ethereum",
"symbol": "ETHUSDT",
"is_favorite": false
},
{
"id": 3,
"name": "Binance Coin",
"symbol": "BNBUSDT",
"is_favorite": false
}
]