Diff

mod_rest/README.markdown @ 3826:21ffca4d3aae

mod_rest: Document most of JSON mappings
author Kim Alvefur <zash@zash.se>
date Thu, 02 Jan 2020 10:08:48 +0100
parent 3820:d3757e089433
child 3827:7d909976ca88
line wrap: on
line diff
--- a/mod_rest/README.markdown	Thu Jan 02 09:59:31 2020 +0100
+++ b/mod_rest/README.markdown	Thu Jan 02 10:08:48 2020 +0100
@@ -146,7 +146,44 @@
 }
 ```
 
-Mapping of various XMPP stanza payloads to JSON.
+Further JSON object keys as follows:
+
+#### Messages
+
+`body`
+:   Human-readable message text.
+
+`subject`
+:   Message subject or MUC topic.
+
+`html`
+:   HTML.
+
+`oob_url`
+:   URL of an out-of-band resource, often used for images.
+
+#### Presence
+
+`show`
+:   [Online
+    status](https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show),
+    `away`, `dnd` etc.
+
+`status`
+:   Human-readable status message.
+
+`join`
+:   Boolean. Join a group chat.
+
+#### Info-Queries
+
+Only one type of payload can be included in an `iq`.
+
+`ping`
+:   Send a ping. Get a pong. Maybe.
+
+`disco`
+:   Retrieve service discovery information about an entity.
 
 ### XML