Mercurial > libervia-backend
comparison doc/libervia-cli/pubsub.rst @ 3573:813595f88612
merge changes from main branch
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 17 Jun 2021 13:05:58 +0200 |
parents | 267e4987b58b |
children | 7c4fcef5b561 7acf19bdca2f |
comparison
equal
deleted
inserted
replaced
3541:888109774673 | 3573:813595f88612 |
---|---|
43 | 43 |
44 Retrieve the last 5 notes from our custom notes node:: | 44 Retrieve the last 5 notes from our custom notes node:: |
45 | 45 |
46 $ li pubsub get -n notes -m 5 | 46 $ li pubsub get -n notes -m 5 |
47 | 47 |
48 .. _li_pubsub_delete: | |
49 | |
48 delete | 50 delete |
49 ====== | 51 ====== |
50 | 52 |
51 Delete an item from a node. If ``-N, --notify`` is specified, subscribers will be notified | 53 Delete an item from a node. If ``-N, --notify`` is specified, subscribers will be notified |
52 of the item retraction. | 54 of the item retraction. |
74 ------- | 76 ------- |
75 | 77 |
76 Edit the last note in our custom node:: | 78 Edit the last note in our custom node:: |
77 | 79 |
78 $ li pubsub edit -n notes -L | 80 $ li pubsub edit -n notes -L |
81 | |
82 .. _li-pubsub_rename: | |
83 | |
84 rename | |
85 ====== | |
86 | |
87 Move a item to a new ID. As there is currently no "rename" or "move" operation in XMPP | |
88 PubSub, this is done by republishing the item with the new ID, then deleting the old item | |
89 if the publication succeed. | |
90 | |
91 This is notably useful when user friendly URL based on ID are used, and one need to fix a | |
92 typo or something else. | |
93 | |
94 example | |
95 ------- | |
96 | |
97 Rename a PubSub item with ID ``123`` to ``456``:: | |
98 | |
99 $ li pubsub rename -n some_node -i 123 456 | |
79 | 100 |
80 subscribe | 101 subscribe |
81 ========= | 102 ========= |
82 | 103 |
83 Subscribe to a node. | 104 Subscribe to a node. |
290 By default a dry run is done, which means that no item is modified or deleted. To actually | 311 By default a dry run is done, which means that no item is modified or deleted. To actually |
291 do the transformation, you have to use ``--apply`` argument. | 312 do the transformation, you have to use ``--apply`` argument. |
292 | 313 |
293 If you have to modify the ``publisher`` of an item, you need specific privileges. The | 314 If you have to modify the ``publisher`` of an item, you need specific privileges. The |
294 ``--admin`` allows you do to that, but it must be supported by your PubSub service | 315 ``--admin`` allows you do to that, but it must be supported by your PubSub service |
295 (currently only ``SàT PubSub`` supports this non standard feature). | 316 (currently only ``Libervia PubSub`` supports this non standard feature). |
296 | 317 |
297 To modify all items of a node, use the ``-A, --all`` option. This will use `RSM`_ | 318 To modify all items of a node, use the ``-A, --all`` option. This will use `RSM`_ |
298 repetitively until all items are treated. Of course that means that your PubSub service | 319 repetitively until all items are treated. Of course that means that your PubSub service |
299 must support RSM. The items being republished, they will reappear on top of your node, | 320 must support RSM. The items being republished, they will reappear on top of your node, |
300 that's why it is recommended to use ``--order-by creation`` option when supported by the | 321 that's why it is recommended to use ``--order-by creation`` option when supported by the |