Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.23 KB

tests.rest

File metadata and controls

46 lines (32 loc) · 1.23 KB

@host=http://localhost:9000/api @token="Bearer eyJ0eXAOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImFzZGYiLCJleHAiOjIwMDAwMDAwMDB9.JRKaZjEsn0y_vwjUCjfYLD1odbtOfPF9slRXAxS6PgE"

#### create user POST {{host}}/create_user Content-Type: application/json

{
"username":"asdf", "pass":"asdfasdf", "email":"[email protected]"

}

#### authorize POST {{host}}/authorize Content-Type: application/json

{"username":"meem","pass":"meemmeem"}

#### access GET {{host}}/protected Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImFzZGYiLCJleHAiOjIwMDAwMDAwMDB9.JRKaZjEsn0y_vwjUCjfYLD1odbtOfPF9slRXAxS6PgE Content-Type: application/json

{}

#### get_meters GET {{host}}/get_meters Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6ImFzZGYiLCJleHAiOjIwMDAwMDAwMDB9.JRKaZjEsn0y_vwjUCjfYLD1odbtOfPF9slRXAxS6PgE

#### create_entry POST {{host}}/create_entry Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6Im1lZW0iLCJleHAiOjIwMDAwMDAwMDB9._hr413daLiZyLba-Ry8F00QDwzKJ6CbPmxi4wxcwfIc Content-Type: application/json

{
"meters": 10

}

#### highscore GET {{host}}/highscore Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6Im1lZW0iLCJleHAiOjIwMDAwMDAwMDB9._hr413daLiZyLba-Ry8F00QDwzKJ6CbPmxi4wxcwfIc