-
Notifications
You must be signed in to change notification settings - Fork 3
[SERVER] Debug Methods
URL: http://wifi-location.appspot.com/
General Status Code:
10: Crash/Exception, View Error Log for Details
11: No JSON received
12: request not recognized
[SET USER - adduser]: used for adding an entry from the user table
- POST: http://wifi-location.appspot.com/setuser/
- BODY: { "command":"adduser", "first_name":"jordan", "last_name":"Fox", "short_name":"Jordan" }
- RESPONSE:
{
"status" : 0,
"message": "user added successfully",
}
- STATUS:
0: success
1: error
[SET USER - deleteuser]: used for removing an entry from the user table
- POST: http://wifi-location.appspot.com/setuser/
- BODY: { "command":"deleteuser", "short_name":"Jordan" }
- RESPONSE:
{
"status" : 0,
"message": "user deleted successfully",
}
- STATUS:
0: success
1: error
[SET FRIEND - addfriend]: used for creating a friendship, used for debugging purposes only, bypasses pending request phase
- POST: http://wifi-location.appspot.com/setfriend/
- BODY: { "command":"addfriend", "user_name":"Jordan", "friend":"Alex"}
- RESPONSE:
{
"status" : 0,
"message": "add friend successful",
}
- STATUS:
0: success
1: error
[SET FRIEND - deletefriend]: used for removing an entry from the friends table
- POST: http://wifi-location.appspot.com/setfriend/
- BODY: { "command":"deletefriend", "user_name":"Jordan", "friend":"Alex"}
- RESPONSE:
{
"status" : 0,
"message": "delete friend successful",
}
- STATUS:
0: success
1: error
[GET USER ID]: used for getting the user id, for debugging and testing purposes only, eventually the userid will be return through login or in the friendslist
- POST: http://wifi-location.appspot.com/getuserid/
- BODY: { "short_name" : "Jordan" }
- RESPONSE:
{
"status" : 0,
"message" : "user found",
"user_id" : 21
}
- STATUS:
0: success
1: error
BSSID (zones, mac_address) zones is the reference entity of Areas table sample REST call (returning the zone id): http://wifi-location.appspot.com/rest/BSSIDZones?feq_mac_address=00:1f:45:6c:8e:30
Areas(zone_id,zone_name) sample REST call (returning the proper zone name): http://wifi-location.appspot.com/rest/Areas?feq_zone_id=1
Friends (user_name, friend_name) sample REST call (returning list of friends): http://wifi-location.appspot.com/rest/Friends?feq_user_name=Alex