Closed TomasNilsson closed 9 years ago
Comment by tomas-nilsson Tuesday Mar 03, 2015 at 19:55 GMT
Bearing (the direction from the search point to another user) is included in the server response for nearby users, see #4.
Bearing is given as a number of clockwise degrees from due north, for example:
Comment by tomas-nilsson Monday Mar 09, 2015 at 04:55 GMT
How to get user update for your master user (single user):
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H 'Authorization: Token token="wsjdhkjhksfdjhk"' -X GET http://localhost:3000/api/users/2
Number 2 at the end of the url is the id for the master user. Change this number according to the result from the compass algorithm.
The response looks like this:
{
"id":2,
"username":"test",
"distance":0.0,
"bearing":90.0,
"friend":false,
"song":{
"name":"Firestone",
"artist":"Conrad, Kygo",
"uri":"spotify:track:2sNvitW3TxiTeC9xT9f2ZZ",
"image_url":"https://i.scdn.co/image/4e3a6b099bb58c6da54502a516b3aea2c0a7b2a8"
}
}
Issue by tomas-nilsson Sunday Feb 15, 2015 at 05:42 GMT Originally opened as https://github.ucsb.edu/tomas-nilsson/SpotiTraceApp/issues/8