Skip to content

PIWEEK/mrfogg

Repository files navigation

MR FOGG

MR FOGG

Collaborative travel planning

Public API

http://docs.mrfogg.apiary.io/

Test commands

The test commands use curl

To populate the database, we use a custom fixtures endpoint. The endpoint loads static data, so it should be used one time only (if not, it will fail due database constraints).

curl -X GET -H "Content-Type: application/json" http://localhost:8080/fixtures/populate

Obtain the user list

curl -X GET -H "Content-Type: application/json" http://localhost:8080/users/

Login to the application

curl -X POST -H "Content-Type: application/json" -d '{ "email": "my@user.com", "password": "email" }' http://localhost:8080/auth/login

Current user

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer myToken" http://localhost:8080/users/me

User by id

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer myToken" http://localhost:8080/users/1