Skip to content
catherinettt edited this page May 27, 2012 · 34 revisions

[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,
    "last_update": "just now",
    "zone_name": "Galleria3_1"
    "map_name": "/media/zonemaps/map1.png"
    }
  • STATUS:
    0: success (zone name & id returned, user location updated)
    1: user not found
    2: zone not found (mac_address unknown)
    3: map not found

[get list of friends] : ask server for a list of friends

  • POST: http://wifi-location.appspot.com/request/friendlist

  • 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

  • POST: http://wifi-location.appspot.com/request/friendship

  • 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)


Clone this wiki locally