The user object contains information about a specific HipGeo user. The rights of the authenticated user are evaluated to determine what information they are allowed to view and only that information is returned. Public information is always available to all users.
Objects can be referenced using either the USERID string specified in the data returned by the API or using "me" which references the authenticated user.
User objects support the GET , PUT, and DELETE methods as indicated in the examples below. You must be the authenticated user to PUT or DELETE a user.
Definition of proprietary parameters in the user object:
GET http://api.hipgeo.com/me?access_token=TOKENVALUE
Returns:
{
"user":{
"id":"u_777",
"name":"Jonathan",
"shareable":1,
"pingable":1,
"url":"http:\/\/www.hipgeo.com\/Gerard",
"fullname":"Jonathan Swiift",
"avatar":{
"id":"m_11101",
"shareable":0,
"type":0,
"when":"2012-01-06 22:42:29",
"icon":"http:\/\/img.hipgeo.com\/4c0faecc4ffdb3c15ea72a5f0aa8fb58_m?11101",
"icon_l":"http:\/\/img.hipgeo.com\/4c0faecc4ffdb3c15ea72a5f0aa8fb58_l?11101",
"icon_b":"http:\/\/img.hipgeo.com\/4c0faecc4ffdb3c15ea72a5f0aa8fb58_b?11101",
"full":"http:\/\/img.hipgeo.com\/4c0faecc4ffdb3c15ea72a5f0aa8fb58_d?11101",
"height":494,
"width":662
},
"photo":"http:\/\/img.hipgeo.com\/4c0faecc4ffdb3c15ea72a5f0aa8fb58_m?11101",
"position":{
"when":"2012-03-09 00:19:00",
"coord":{
"lat":33.556025,
"lon":-117.555843
},
"title":"Traveled within Diamond Bar, CA",
"id":"t_133671"
},
"about":"TESTER TESTER TESTER",
"firstname":"Jonathan",
"lastname":"Swift",
"email":"jonathanswift@fantasy.com",
"apns_token":"a3cbc326a497c314a4067ded06bb5b651cc9d8fa3452483bf0cf92c3a9f17ae9",
"apns_types":7,
"c2dm_token":"0",
"view_friends":7,
"global_privacy":7,
"allow_auto_pinpoint":1,
"fb_visit":0,
"fb_graph":1,
"comment_delivery":17,
"like_delivery":0,
"news_delivery":1,
"follow_delivery":0,
"tzn":"America\/Los_Angeles",
"tzo":-25200,
"distance_unit":2,
"debug":1,
"options":{
"fred":1,
"bill":3
},
"stats":{
"locations":2171,
"travels":2181,
"distance":129228934.08,
"photos":1093,
"journal_likes":"75",
"following":41,
"followers":28
}
},
"result":"success",
"st":1332350191
}
| Error Code | Possible Errors |
|---|---|
| 401 |
|
| 404 |
|
GET http://api.hipgeo.com/u_555
Returns:
{
"user":{
"id":"u_555",
"name":"joe",
"shareable":1,
"pingable":1,
"url":"http:\/\/www.hipgeo.com\/joe",
"fullname":"Joe Boxer",
"avatar":{
"id":"m_2519",
"shareable":0,
"type":0,
"when":"2011-06-29 21:38:52",
"icon":"http:\/\/img.hipgeo.com\/410eac7f08b1ca5b4739bb4f8c61d3_m?2519",
"icon_l":"http:\/\/img.hipgeo.com\/410eac7f08b1ca5b4739bb4f8c61d3_l?2519",
"icon_b":"http:\/\/img.hipgeo.com\/410eac7f08b1ca5b4739bb4f8c61d3_b?2519",
"full":"http:\/\/img.hipgeo.com\/410eac7f08b1ca5b4739bb4f8c61d3_d?2519",
"height":662,
"width":662
},
"photo":"http:\/\/img.hipgeo.com\/410eac7f08b1ca5b4739bb4f8c61d3_m?2519",
"position":{
"when":"2012-03-09 07:53:55",
"coord":{
"lat":33.88436,
"lon":-117.9963
},
"title":"Private Place in Pasadena, CA",
"id":"l_1337157"
},
"friend":1,
"follower":1,
"following":1,
"firstname":"Joe",
"lastname":"Boxer",
"stats":{
"locations":2450,
"travels":2448,
"distance":125411126.59,
"photos":1852,
"journal_likes":"326",
"following":216,
"followers":117
}
},
"result":"success",
"st":1332351808
}
| Error Code | Possible Errors |
|---|---|
| 404 |
|
After registration, the user PUT endpoint can be used to update user data. The attributes that can be updated are:
| Method | Description |
|---|---|
| /me | update auth user data. See Example3 for JSON data structure |
PUT api.hipgeo.com/me?access_token=TOKENVALUE
Data:
{
"firstname":"John",
"lastname":"Doe",
"email":"john@doe.com",
"username":"jon",
"apns_token":"a3cbc326a497c314a4067ded06bb5b6c9d8fa3452483bf0cf92c3a9f17ae9",
"apns_types":5,
"view_friends":0,
"global_privacy":7,
"password":"nowayjose",
"original_password":"nowayjose",
"allow_auto_pinpoint":0,
"tzn":"Asia/Jerusalem",
"facebook":{
"page_id":"100000844496018",
"access_token":"6Pg0PsqUeLH2F--TRUNCATED--Q3U1fWLIRL4Jk35mWUsgJ4t5E0"
},
"twitter":{
"oauth_token_secret":"oL8SbthCEqZyDTZTJBo9pdjDAwBMGGiy4MUfeGlAI",
"oauth_verifier":"6581540",
"user_id":"333225519",
"screen_name":"pkg172",
"oauth_token":"333225519-WxjyA2SMqNH9NZLbfvQl6b4SWVIrGvlrw5XzW54F"
},
"options":{
"fred":1,
"bill":3
},
"like_delivery":0,
"news_delivery":1,
"follow_delivery":16,
"comment_delivery":17,
"fb_visit":1,
"fb_graph":0,
"c2dm_token":"valueoftoken"
}
Returns:
{
"id":"u_215",
"result":"success"
}
| Error Code | Possible Errors |
|---|---|
| 400 |
|
| 401 |
|
User delete requires an additional parameter (full=1). The "full" delete removes the user and all data associated with that user including comments, glls, media, and journal entries. A user delete that leaves some data or allows restore may be supported in the future.
DELETE http://api.hipgeo.com/u_1442?full=1&SHA1PASSWORD&access_token=TOKENVALUE
Returns:
{
"id":"u_1442",
"result":"success",
"st":1332354265
}
| Error Code | Possible Errors |
|---|---|
| 400 |
|
| 401 |
|