Commit | Line | Data |
---|---|---|
3d47ccc8 | 1 | * Create a user: |
787fc3b7 | 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" |
3d47ccc8 JB |
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: | |
c4fba949 JB |
8 | curl --request PUT http://localhost:8000/api/person/1 --data "{ \"firstname\": \"Jamesson\", \"lastname\": \"Elbow\", \"email\": \"jamesson@elbow.com\" }" --header "Content-Type: application/json" |
9 | ||
10 | * Authenticate a user with email and password: | |
4885c7cf | 11 | curl --request POST http://localhost:8000/api/person/authenticate --data "{ \"email\": \"jamesson@elbow.com\", \"password\": \"FD3CC7719AB1776B81D70B65170D8A51119E127488C106622E0D2E680C1B3FFF\" }" --header "Content-Type: application/json" |
3d47ccc8 | 12 | |
8629835e | 13 | * Update/add a user with id 1 localisation: |
787fc3b7 | 14 | 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 | 15 | |
8629835e JB |
16 | * Update a user online status: |
17 | curl --request PUT http://localhost:8000/api/person/1/online | |
18 | curl --request PUT http://localhost:8000/api/person/1/offline | |
19 | ||
199445c0 JB |
20 | * Search a user with a keyword set to isabelle: |
21 | curl --request GET http://localhost:8000/api/person/search?keyword=isabelle | |
80ec112f | 22 | |
f0640a52 JB |
23 | * Show a user with id 1: |
24 | curl --request GET http://localhost:8000/api/person/1 | |
25 | ||
3d47ccc8 | 26 | * Show a user with id 1 friends: |
f0640a52 JB |
27 | curl --request GET http://localhost:8000/api/person/1/friends |
28 | ||
c4fba949 JB |
29 | * Show a user with id 1 friends with me: |
30 | curl --request GET http://localhost:8000/api/person/1/friendswithme | |
31 | ||
3d47ccc8 | 32 | * Show a user with id 1 localisation: |
f0640a52 JB |
33 | curl --request GET http://localhost:8000/api/person/1/localisation |
34 | ||
c4fba949 JB |
35 | * Show a user with id 1 fuzzy localisation at a distance of 300 meters: |
36 | curl --request GET http://localhost:8000/api/person/1/localisation/fuzzy/300 | |
37 | ||
3d47ccc8 | 38 | * Show a user with id 1 localisations: |
f0640a52 | 39 | curl --request GET http://localhost:8000/api/person/1/localisations |
c4fba949 JB |
40 | |
41 | * Show a user with id 1 fuzzy localisations at a distance of 300 meters: | |
42 | curl --request GET http://localhost:8000/api/person/1/localisations/fuzzy/300 |