X-Git-Url: https://git.piment-noir.org/?p=Project_proches_de_moi-server.git;a=blobdiff_plain;f=tests%2Fcurl.txt;fp=tests%2Fcurl.txt;h=3798713872e33883cc4ba0bcd3ae7b3decd9bccb;hp=aa80b3a9ccbead7707dff6e056c322eb9d385b27;hb=8629835e06e50277f8868c19ea93f41313c16586;hpb=3d47ccc80097bec1a6890e103357d7c7cf0cff87 diff --git a/tests/curl.txt b/tests/curl.txt index aa80b3a..3798713 100644 --- a/tests/curl.txt +++ b/tests/curl.txt @@ -7,9 +7,13 @@ curl --request DELETE http://localhost:8000/api/person/1 * Update a user with id 1: curl --request PUT http://localhost:8000/api/person/1 --data "{ \"firstname\": \"Jamesson\", \"lastname\": \"Elbow\", \"email\": \"james@elbow.com\"}" --header "Content-Type: application/json" -* Update a user localisation with id 1: +* Update/add a user with id 1 localisation: 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" +* Update a user online status: +curl --request PUT http://localhost:8000/api/person/1/online +curl --request PUT http://localhost:8000/api/person/1/offline + * Show a user with id 1: curl --request GET http://localhost:8000/api/person/1