comparison doc/libervia-cli/pubsub_attachments.rst @ 3873:8b76caa89aa0

doc (cli/pubsub, cli/blog): `attachments` subcommands documentation: rel 370
author Goffi <goffi@goffi.org>
date Fri, 22 Jul 2022 17:16:28 +0200
parents
children
comparison
equal deleted inserted replaced
3872:76fb0739cc9c 3873:8b76caa89aa0
1 .. _libervia-cli_pubsub_attachments:
2
3 =======================================================
4 pubsub/attachments: (Un)Attach Metadata to Pubsub Items
5 =======================================================
6
7 ``attachments`` is a subcommand grouping all pubsub commands related to "pubsub
8 attachments" specification.
9
10 With them, you can (un)attach data to any pubsub item. This is notably used to handle
11 data like saying if an item is (un)noticed, or add emoji reactions.
12
13 get
14 ===
15
16 Retrieve a list of all attached data to an item.
17
18 By default all attachments of the item are returned, this can be filtered by using ``-j
19 JIDS, --jid JIDS``
20
21 example
22 -------
23
24 Louise check all attachments on her last blog post::
25
26 $ li pubsub attachments get -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0
27
28 set
29 ===
30
31 Update or replace attachments. By default new attachments are updated, but if the ``-R,
32 --replace`` is used, new attachments replace the whole former one where it make sense. For
33 instance, ``-R`` doesn't change anything for ``noticed`` attachments, but it will replace
34 all reactions (potentially with no reaction at all), where the default behaviour is to
35 merge former and new reactions.
36
37 Note that only specified attachments are affected, if unknown or unspecified attachments
38 exist, they will stay unmodified.
39
40 For now, only ``noticed`` (to say that an element has been seen and taken into account)
41 and ``reactions`` (emojis to show emotion or other kind of reaction about something) are
42 managed.
43
44 ``-N [BOOLEAN], --noticed [BOOLEAN]`` takes on optional argument to say if the item is
45 noticed or not. If the optional argument is not specified, if will be the same as if the
46 ``true`` value was used.
47
48 examples
49 --------
50
51 Pierre wants to indicate to Louise that is has seen and he took into account her last blog post::
52
53 $ li pubsub attachments set -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0 -N
54
55 Louise wants to react to Pierre blog post about night trains::
56
57 $ li pubsub attachments set -s pierre@example.net -n urn:xmpp:microblog:0 -i nigh-train-are-great-f120 -r 🚆🌜💤