This document describes the Golem API. Note that the API is still in development and there may be many major changes in the future.
- Golem uses websockets.
- The URL to connect is
/api/ws.
- All messages are sent as JSON objects.
- They are externally tagged.
| Message | Description |
|---|---|
| Authenticate(PartialUser) | Authenticate with the required parts of a user. |
| Message(SendMessage) | Send a message. |
| LoadAllMessages | Load all messages. |
| Message | Description |
|---|---|
| Authenticate { success: bool } | Whether or not the authentication succeeded. |
| NewMessage(Message) | A new message was sent. |
| Error | There was an internal server error. |
| Messages(Vec<Message>) | The messages that were previously requested. |
| Duplicate(String) | A duplicate message was sent. String=dup_id |
| Join(User) | A user has just joined. |