Mercurial > prosody-modules
comparison mod_rest/README.markdown @ 3827:7d909976ca88
mod_rest: Describe kind and type fields
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Jan 2020 10:45:14 +0100 |
parents | 21ffca4d3aae |
children | a8aa11cc351d |
comparison
equal
deleted
inserted
replaced
3826:21ffca4d3aae | 3827:7d909976ca88 |
---|---|
148 | 148 |
149 Further JSON object keys as follows: | 149 Further JSON object keys as follows: |
150 | 150 |
151 #### Messages | 151 #### Messages |
152 | 152 |
153 `kind` | |
154 : `"message"` | |
155 | |
156 `type` | |
157 : Commonly `"chat"` for 1-to-1 messages and `"groupchat"` for group | |
158 chat messages. Others include `"normal"`, `"headline"` and | |
159 `"error"`. | |
160 | |
153 `body` | 161 `body` |
154 : Human-readable message text. | 162 : Human-readable message text. |
155 | 163 |
156 `subject` | 164 `subject` |
157 : Message subject or MUC topic. | 165 : Message subject or MUC topic. |
161 | 169 |
162 `oob_url` | 170 `oob_url` |
163 : URL of an out-of-band resource, often used for images. | 171 : URL of an out-of-band resource, often used for images. |
164 | 172 |
165 #### Presence | 173 #### Presence |
174 | |
175 `kind` | |
176 : `"presence"` | |
177 | |
178 `type` | |
179 : Empty for online or `"unavailable"` for offline. | |
166 | 180 |
167 `show` | 181 `show` |
168 : [Online | 182 : [Online |
169 status](https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show), | 183 status](https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show), |
170 `away`, `dnd` etc. | 184 `away`, `dnd` etc. |
176 : Boolean. Join a group chat. | 190 : Boolean. Join a group chat. |
177 | 191 |
178 #### Info-Queries | 192 #### Info-Queries |
179 | 193 |
180 Only one type of payload can be included in an `iq`. | 194 Only one type of payload can be included in an `iq`. |
195 | |
196 `kind` | |
197 : `"iq"` | |
198 | |
199 `type` | |
200 : `"get"` or `"set"` for queries, `"response"` or `"error"` for | |
201 replies. | |
181 | 202 |
182 `ping` | 203 `ping` |
183 : Send a ping. Get a pong. Maybe. | 204 : Send a ping. Get a pong. Maybe. |
184 | 205 |
185 `disco` | 206 `disco` |