Skip to content

[SERVER] Debug Methods

jrf2 edited this page May 30, 2012 · 6 revisions

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


[SET FRIEND - addfriend]: used for creating a friendship, used for debugging purposes only, bypasses pending request phase

[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


OLD REST SERVICE

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

Clone this wiki locally