API reference¶
Resource |
Operation |
Description |
|---|---|---|
Message |
Send a message from a client to a user. |
|
Get users responses to client. |
||
Respond to client message. |
||
User Location |
List user locations. |
|
Add or update user location. |
||
Remove user location. |
Reference¶
-
GET/locations¶ List user locations.
If no cooridnates are supplied, all users will be returned.
- Query Parameters
longitude (float) – (optional) Longitude around which to fetch users.
latitude (float) – (optional) Latitude around which to fetch users.
- Response JSON Object
users (List[object]) – User list
-
POST/locations/(int: user_id)¶ Add or update user location.
- Request Headers
Authorization – Basic <myusername>:<mypassword>.
- Parameters
user_id (int) – User ID.
- Query Parameters
longitude (float) – Longitude around which to fetch users.
latitude (float) – Latitude around which to fetch users.
nick (string) – Nickname or alias for user.
- Response JSON Object
success (bool) – True if request was succesful.
-
DELETE/locations/(int: user_id)¶ Remove user and location.
Note
Locations are also expired automatically after a given period.
- Request Headers
Authorization – Basic <myusername>:<mypassword>.
- Parameters
user_id (int) – User ID.
- Response JSON Object
success (bool) – True if request was succesful.
-
POST/messages¶ Send a message from a client to a user.
- Request Headers
clientId – Unique client ID. Min length 25 characters.
- Request JSON Object
public_id (string) – Public ID of user to send message to.
message (string) – Message.
- Response JSON Object
success (bool) – True if request was succesful.
-
GET/messages¶ Get responses to client.
If a response to the clients message exists, it is returned. The returned messages are removed and are not returned on subsequent requests.
- Request Headers
clientId – Unique client ID. Min length 25 characters.
- Response JSON Object
responses (List[string]) – list of string responses. Eg.
{'responses': [{'public_id': 'abc123', 'response': 'accepted'}]}.
-
POST/messages/(string: client_id)¶ Respond to client message.
- Request Headers
Authorization – Basic <myusername>:<mypassword>.
- Parameters
client_id – ID of receiving client.
- Request JSON Object
user_id (string) – User ID of responding user.
response (string) – Response message.
- Response JSON Object
success (bool) – True if request was succesful.