Commit | Line | Data |
---|---|---|
3d47ccc8 JB |
1 | * Create a user: |
2 | curl --request POST http://localhost:8000/api/person/register --data "{ \"firstname\": \"James\", \"lastname\": \"Elbow\", \"email\": \"james@elbow.com\", \"password\": \"FD3CC7719AB1776B81D70B65170D8A51119E127488C106622E0D2E680C1B3FFF\"}" --header "Content-Type: application/json" | |
3 | ||
4 | * Delete a user with id 1: | |
5 | curl --request DELETE http://localhost:8000/api/person/1 | |
6 | ||
7 | * Update a user with id 1: | |
8 | curl --request PUT http://localhost:8000/api/person/1 --data "{ \"firstname\": \"Jamesson\", \"lastname\": \"Elbow\", \"email\": \"james@elbow.com\"}" --header "Content-Type: application/json" | |
9 | ||
10 | * Update a user localisation with id 1: | |
11 | curl --request POST http://localhost:8000/api/person/1/localisation --data "{ \"timestamp\": \"$(date --iso-8601=seconds)\", \"latitude\": \"43.23\", \"longitude\": \"5.43\"}" --header "Content-Type: application/json" | |
f0640a52 JB |
12 | |
13 | * Show a user with id 1: | |
14 | curl --request GET http://localhost:8000/api/person/1 | |
15 | ||
3d47ccc8 | 16 | * Show a user with id 1 friends: |
f0640a52 JB |
17 | curl --request GET http://localhost:8000/api/person/1/friends |
18 | ||
3d47ccc8 | 19 | * Show a user with id 1 localisation: |
f0640a52 JB |
20 | curl --request GET http://localhost:8000/api/person/1/localisation |
21 | ||
3d47ccc8 | 22 | * Show a user with id 1 localisations: |
f0640a52 | 23 | curl --request GET http://localhost:8000/api/person/1/localisations |