Mercurial > prosody-modules
comparison mod_pubsub_get/README.md @ 6176:119c0eb65bf3
mod_pubsub: new module to fetch pubsub items via HTTP GET
| author | nicoco <nicoco@nicoco.fr> |
|---|---|
| date | Wed, 12 Mar 2025 14:54:10 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 6175:131b8bfbefb4 | 6176:119c0eb65bf3 |
|---|---|
| 1 --- | |
| 2 labels: | |
| 3 - "Stage-Alpha" | |
| 4 summary: Get pubsub items via HTTP GET | |
| 5 --- | |
| 6 | |
| 7 # Introduction | |
| 8 | |
| 9 WARNING: this module does not implement any type of access control and will effectively make all | |
| 10 pubsub data public on the component it is loaded onto. | |
| 11 | |
| 12 This module lets you fetch the items of a specific pubsub node via an HTTP GET request. | |
| 13 I implemented it for a read-only view of comments published according to XEP-0277. | |
| 14 | |
| 15 # Configuration | |
| 16 | |
| 17 Nothing is configurable, just load the module on a specific component. | |
| 18 | |
| 19 ```lua | |
| 20 Component "comments.example.com" "pubsub" | |
| 21 modules_enabled = { "pubsub_get" } | |
| 22 ``` | |
| 23 | |
| 24 # Use | |
| 25 | |
| 26 To query the items of the node "urn:xmpp:microblog:0:comments/some-article", issue a GET for | |
| 27 `https://comments.example.com:5281/pubsub_get?node=urn:xmpp:microblog:0:comments/some-article`. | |
| 28 This will return a JSON object containing the items data. | |
| 29 | |
| 30 # TODO | |
| 31 | |
| 32 - Only return items with "open" access model | |
| 33 | |
| 34 # Compatibility | |
| 35 | |
| 36 Requires Prosody trunk / 0.12 |
