summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-09 00:57:31 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-09 11:45:31 -0400
commitba96974bdebd6d4ec345907d49944b5ee644ed47 (patch)
tree8811ef8981a915a8cc17d8a1e576750b31cbdd0b /docs
parentda1810afc5a627a518131cfb0af0996c5ec60bcf (diff)
Provide a view of logins to clients.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md25
1 files changed, 17 insertions, 8 deletions
diff --git a/docs/api.md b/docs/api.md
index 56d361d..4145aa8 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -25,6 +25,12 @@ Returns information needed to boot the client. Also the recommended way to check
"id": "L1234abcd",
},
"resume_point": "1312",
+ "logins": [
+ {
+ "id": "L1234abcd",
+ "name": "example username"
+ }
+ ],
"channels": [
{
"name": "nonsense and such",
@@ -32,10 +38,7 @@ Returns information needed to boot the client. Also the recommended way to check
"messages": [
{
"at": "2024-09-27T23:19:10.208147Z",
- "sender": {
- "id": "L1234abcd",
- "name": "example username"
- },
+ "sender": "L1234abcd",
"id": "M1312acab",
"body": "beep"
}
@@ -198,6 +201,15 @@ The event IDs `hi` sends in `application/event-stream` encoding are ephemeral, a
The returned event stream is a sequence of events:
```json
+id: 1232
+data: {
+data: "type": "login",
+data: "event": "created",
+data: "at": "2024-09-27T23:17:10.208147Z",
+data: "id": "L1234abcd",
+data: "name": "example username"
+data: }
+
id: 1233
data: {
data: "type": "channel",
@@ -213,10 +225,7 @@ data: "type": "message",
data: "event": "sent",
data: "at": "2024-09-27T23:19:10.208147Z",
data: "channel": "C9876cyyz",
-data: "sender": {
-data: "id": "L1234abcd",
-data: "name": "example username"
-data: },
+data: "sender": "L1234abcd",
data: "id": "M1312acab",
data: "body": "beep"
data: }