Comparison

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
comparison
equal deleted inserted replaced
3825:802087d3155a 3826:21ffca4d3aae
144 "kind" : "message", 144 "kind" : "message",
145 "type" : "chat" 145 "type" : "chat"
146 } 146 }
147 ``` 147 ```
148 148
149 Mapping of various XMPP stanza payloads to JSON. 149 Further JSON object keys as follows:
150
151 #### Messages
152
153 `body`
154 : Human-readable message text.
155
156 `subject`
157 : Message subject or MUC topic.
158
159 `html`
160 : HTML.
161
162 `oob_url`
163 : URL of an out-of-band resource, often used for images.
164
165 #### Presence
166
167 `show`
168 : [Online
169 status](https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show),
170 `away`, `dnd` etc.
171
172 `status`
173 : Human-readable status message.
174
175 `join`
176 : Boolean. Join a group chat.
177
178 #### Info-Queries
179
180 Only one type of payload can be included in an `iq`.
181
182 `ping`
183 : Send a ping. Get a pong. Maybe.
184
185 `disco`
186 : Retrieve service discovery information about an entity.
150 187
151 ### XML 188 ### XML
152 189
153 ``` {.xml} 190 ``` {.xml}
154 <message type="" id="" to="" from="" xml:lang=""> 191 <message type="" id="" to="" from="" xml:lang="">