diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:46 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:46 -0400 |
| commit | fecc78192ff1ad83c6a2f41e35a65ac189d25c6f (patch) | |
| tree | 481d82e99cf8aad8fe256d8186ae72bcee23bf9f /docs | |
| parent | dd62b823e01934a0f841256fdb17b551091896bf (diff) | |
| parent | 2f0b77e8fd02a137047c8975a573626cd76310ff (diff) | |
Merge branch 'wip/event-vocabulary'
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.md | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/docs/api.md b/docs/api.md index 91485f3..7414ccf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -25,23 +25,25 @@ 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", "id": "C1234abcd", - "messages": [ - { - "at": "2024-09-27T23:19:10.208147Z", - "sender": { - "id": "L1234abcd", - "name": "example username" - }, - "message": { - "id": "M1312acab", - "body": "beep" - } - } - ] + } + ], + "messages": [ + { + "at": "2024-09-27T23:19:10.208147Z", + "channel": "C1234abcd", + "sender": "L1234abcd", + "id": "M1312acab", + "body": "beep" } ] } @@ -200,50 +202,49 @@ 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": "created", +data: "type": "channel", +data: "event": "created", data: "at": "2024-09-27T23:18:10.208147Z", -data: "channel": { -data: "id": "C9876cyyz", -data: "name": "example channel 2" -data: } +data: "id": "C9876cyyz", +data: "name": "example channel 2" data: } id: 1234 data: { data: "type": "message", +data: "event": "sent", data: "at": "2024-09-27T23:19:10.208147Z", -data: "channel": { -data: "id": "C9876cyyz", -data: "name": "example channel 2" -data: }, -data: "sender": { -data: "id": "L1234abcd", -data: "name": "example username" -data: }, -data: "message": { -data: "id": "M1312acab", -data: "body": "beep" -data: } +data: "channel": "C9876cyyz", +data: "sender": "L1234abcd", +data: "id": "M1312acab", +data: "body": "beep" data: } id: 1235 data: { +data: "type": "message", +data: "event": "deleted", data: "at": "2024-09-28T02:44:27.077355Z", -data: "channel": { -data: "id": "C9876cyyz", -data: "name": "example channel 2" -data: }, -data: "type": "message_deleted", -data: "message": "M1312acab" +data: "id": "M1312acab" data: } id: 1236 data: { +data: "type": "channel", +data: "event": "deleted", data: "at": "2024-09-28T03:40:25.384318Z", -data: "type": "deleted", -data: "channel": "C9876cyyz" +data: "id": "C9876cyyz" data: } ``` |
