/follow/user
{ groupId: "your group id", userId: "your user id", location: { lat: latitude, lng: longitude, time: timestamp for this location (ms since 1/1/1970 00:00:00), accuracy: accuracy circle in meters, speed: optional in meters/second, heading: optional in degrees }, options: { follow_type: one of "orbit", "free_look", "leash", cruise: one of "forward", "pause", "reverse", look_at_me: true or false } }
{ status: "Message if all is well" error: "Message if something went wrong", it: true/false }
groupId
.
When a client follows the user identified by
userId
, the it
field in the response is true
;
otherwise it's not. The target can thus tell if they're being tracked specifically, vs just appearing as one of multiple
users moving about in a group.
When a target is being tracked specifically, the options
in the POST body have the potential to affect
the manner in which they're followed (assuming the client receiving the notifications agrees). The follow_type
attribute specifies which follow mode to use (if applicable). The cruise
value specifies whether the
copter should try to orbit the target (which actually only applies if follow_type
is "free_look" or "orbit").
If all goes well, you'll get a status
field in the response; its presence in the response body indicates
that things went well. If things go badly, there will instead be an error
field in the response. And, it
will say something about what went wrong.
DELETE
to /follow/user/:groupId/:userId
.
This will immediately tell any subscribed clients that you're not around, and they can stop tracking you.
/follow/user/:groupId/:userId
{ status: "Message if all is well" error: "Message if something went wrong" }
/follow/group/:groupId
{ status: "Message if all is well" error: "Message if something went wrong" }
/follow/user/:groupId/:userId
{ status: "Message if all is well" error: "Message if something went wrong" }
/follow/group/:groupId
{ status: "Message if all is well" error: "Message if something went wrong" }
/follow/groups
[ test_group: { test_user: { loc: {lat: 123, lng: 234, altitude: 800, accuracy: 10, speed: 5, time: 1289320229} } }, some_other_group: { some_user: { loc: {lat: 123, lng: 234, altitude: 800, accuracy: 10, speed: 5, time: 1289320229} } } ]
/follow/group/:groupId
test_group: { test_user: { loc: {lat: 123, lng: 234, altitude: 800, accuracy: 10, speed: 5, time: 1289320229} } }
/follow/user/:groupId/:userId
loc: {lat: 123, lng: 234, altitude: 800, accuracy: 10, speed: 5, time: 1289320229}