-
Notifications
You must be signed in to change notification settings - Fork 3
[SERVER] Requests
[updatezone]: gets zone information and updates users location
- POST: http://wifi-location.appspot.com/request/updatezone
- BODY: {"user_id" : 1, "mac_address" : "00:1f:45:64:17:d1" }
- RESPONSE:
{
"status" : 0 "zone_id": 21,
"user_location": 21,
"last_update": "just now",
"user": "Alex",
"mac_address": "00:1f:45:64:17:d1",
"zone_name": "Galleria3_1"
"map_name": "unknown"
}
- STATUS:
0: success (zone name & id returned, user location updated)
1: user not found
2: zone not found (mac_address unknown)
[get list of friends] : ask server for a list of friends
-
BODY: {"user_id" : 1}
-
RESPONSE:
{
"status" : 0
"friend_list":
[
{
"friend_name": "Alex",
"friend_location": "unknown",
"last_update": "2 days ago"
},
{
"friend_name": "Catherine",
"friend_location": "unknown",
"last_update": "2 days ago"
},
]
} -
STATUS:
0: success (list of friends returned)
1: user not found
[send friendship request] : sends the server a friendship request
-
BODY: {"user_id" : 1, "friend_id" : 2 }
-
RESPONSE:
{
"status" : 0
"request_id": 33
} -
STATUS:
0: success (friendship request registered)
1: user not found
2: friend not found
3: duplication (request already existed)
4: user_id equals friend_id (user can't add him/herself)