56 lines
1.3 KiB
HTTP
56 lines
1.3 KiB
HTTP
### Get All Students (Login)
|
|
# @name login
|
|
POST http://localhost:8000/api/v1/login
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
|
|
{
|
|
"email": "[email protected]",
|
|
"password": "123"
|
|
}
|
|
|
|
### Capture the token & id
|
|
@token = {{login.response.body.token}}
|
|
@id = {{login.response.body.user.id}}
|
|
|
|
### Get All matches
|
|
GET http://localhost:8000/api/v1/matches
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer {{token}}
|
|
|
|
### Get me user
|
|
GET http://localhost:8000/api/v1/users/me
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer {{token}}
|
|
|
|
### Get me coins
|
|
GET http://localhost:8000/api/v1/users/me/coins
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer {{token}}
|
|
|
|
### Get me matches
|
|
GET http://localhost:8000/api/v1/users/{{id}}/matches
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer {{token}}
|
|
|
|
### Get me transactions
|
|
GET http://localhost:8000/api/v1/users/{{id}}/transactions?type=C
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer {{token}}
|
|
|
|
### post coin-purchases
|
|
POST http://localhost:8000/api/v1/coin-purchases
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Authorization: Bearer {{token}}
|
|
|
|
{
|
|
"euros": 1,
|
|
"payment_type": "MBWAY",
|
|
"payment_reference": "912345678"
|
|
} |