API Endpoints
status
GET
The GET status endpoint returns the number of friends pending approval and cumulative ping/pong request/response count for the user.
Optional parameters supported are:
- details = 1 -- Returns ping/pong endpoint details
- clear = 1 -- Clears user's ping/pong request/response count
Return information include:
- locationrequests - requests for 'me' user's location. Total number of requests are reflected and each will be cleared with each pong response.
- locationresponse - responses from other users to "me". Total number of responses reflected are cumulative and cleared only by setting parameter clear=1.
- debug = 1 - enables debug tools in the app and is the default in development
| Method |
Description |
| /me/status |
returns friends to approve and ping/pong request/response count |
| /me/status?details=1 |
returns additional details of ping/pong endpoint calls |
| /me/status?clear=1 |
returns current locationresponse count then clears it |
Example1: me/status
GET http://api.hipgeo.com/me/status?access_token=TOKENVALUE
Returns:
{
"friendstoapprove":0,
"locationrequests":{
"count":0
},
"locationresponses":{
"count":0
},
"debug":"1",
"result":"success"
"st":1332437601
}
| Error Code |
Possible Errors |
| 401 |
- Authentication failed
- Token expired
|
| 405 |
- Must be GET, PUT or POST
|
Example2: me/status?details=1
GET http://api.hipgeo.com/me/status?details=1&access_token=TOKENVALUE
Returns:
When no ping/pong data:
{
"friendstoapprove":0,
"locationrequests":{
"count":0,
"data":[
]
},
"locationresponses":{
"count":0,
"data":[
]
},
"debug":"1",
"result":"success"
"st":1332437697
}
When ping/pong data is present: (Note: In this case, City is unknown, therefore incomplete message)
{
"friendstoapprove":0,
"locationrequests":{
"count":1,
"data":[
{
"user":{
"id":"u_333",
"name":"dan",
"shareable":1,
"pingable":1,
"fullname":"Dan Boone",
"photo":"http:\/\/img.hipgeo.com\/410eac7f4f08b1ca5b4739bf8c61d3_b?2519",
"position":{
"when":"2011-07-07 18:41:26",
"coord":{
"lat":37.222,
"lon":-117.444
},
"title":"Unknown city",
"id":"l_38246"
}
},
"message":"Dan Boone is in and wants your location",
"count":"1",
"when":"2011-07-07 18:49:35"
}
]
},
"locationresponses":{
"count":1,
"data":[
{
"user":{
"id":"u_333",
"name":"dan",
"shareable":1,
"pingable":1,
"fullname":"Dan Boone ",
"photo":"http:\/\/img.hipgeo.com\/410eac7f4f08b1ca5b39bb4f8c61d3_b?2519",
"position":{
"when":"2011-07-07 18:41:26",
"coord":{
"lat":37.222,
"lon":-117.444
},
"title":"Unknown city",
"id":"l_38246"
}
},
"message":"Dan Boone is in ",
"when":"2011-07-07 18:36:28"
}
]
},
"debug":"1",
"result":"success"
"st":1332437697
}
| Error Code |
Possible Errors |
| 401 |
- Authentication failed
- Token expired
|
| 405 |
- Must be GET, PUT or POST
|
Example3: me/status?clear=1
GET http://api.hipgeo.com/me/status?clear=1&access_token=TOKENVALUE
Returns:
{
"friendstoapprove":0,
"locationrequests":{
"count":2
},
"locationresponse":{
"count":1
},
"debug":"1",
"result":"success"
"st":1332437797
}
| Error Code |
Possible Errors |
| 401 |
- Authentication failed
- Token expired
|
| 405 |
- Must be GET, PUT or POST
|
POST
The POST status endpoint allows the user to update:
- apns_token
- apns_types
- c2dm_token
- udid
debug = 1 in the return status shows that debug tools are flagged to be turned on in the app; this is normal during development.
| Method |
Description |
| /me/status |
update apns_token, apns_types, c2dm_token and udid. See Example4 for JSON data structure |
Example4: me/status
POST http://api.hipgeo.com/me/status?access_token=TOKENVALUE
Data:
{
"apns_token":"apnsTokenValue",
"apns_types":3,
"c2dm_token":"c2dmTokenValue",
"udid":"uniqueidentifierforandroiddevice"
}
Returns:
{
"friendstoapprove":1,
"locationrequests":{
"count":0
},
"locationresponses":{
"count":0
},
"debug":1,
"result":"success",
"st":1332437421
}
| Error Code |
Possible Errors |
| 401 |
- Unable to parse data
|
| 401 |
- Authentication failed
- Token expired
|
| 405 |
- Must be GET, PUT or POST
|