TomasNilsson / SpotiTraceApp

Android app for the final project in ECE 150 - Mobile Embedded Systems
https://sites.google.com/site/spotitrace/
2 stars 0 forks source link

Best friend feature #11

Closed TomasNilsson closed 9 years ago

TomasNilsson commented 9 years ago

Issue by tomas-nilsson Sunday Feb 15, 2015 at 05:42 GMT Originally opened as https://github.ucsb.edu/tomas-nilsson/SpotiTraceApp/issues/11


TomasNilsson commented 9 years ago

Comment by tomas-nilsson Monday Mar 02, 2015 at 04:24 GMT


How to add a friend:

curl -v -H "Accept: application/json" -H "Content-type: application/json" -H 'Authorization: Token token="dsajhgsljkhvdsahlskfhbcöj"' -X POST -d ' {"id":"1"}'  http://localhost:3000/api/friendships

id is the user id of the user you want to add as a friend.

How to remove a friend:

curl -v -H "Accept: application/json" -H "Content-type: application/json" -H 'Authorization: Token token="dsajhgsljkhvdsahlskfhbcöj"' -X POST -d ' {"id":"1"}'  http://localhost:3000/api/friendships/remove

id is the user id of the user you want to remove as a friend.

How to get a list of current friends:

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H 'Authorization: Token token="dsajhgsljkhvdsahlskfhbcöj"' -X GET http://localhost:3000/api/friendships

The list will look like the JSON output in #4.