summaryrefslogtreecommitdiff
path: root/src/mailman/rest/docs
diff options
context:
space:
mode:
authorBarry Warsaw2016-02-29 22:41:30 -0500
committerBarry Warsaw2016-02-29 22:41:30 -0500
commitca43cac833937e1bff2728fa4074d8c0540323ba (patch)
treec542ed71e37752f8bdd9162f54dbe215ef566861 /src/mailman/rest/docs
parenta6f442b8812849efcf41d72e82801be6238aa61f (diff)
downloadmailman-ca43cac833937e1bff2728fa4074d8c0540323ba.tar.gz
mailman-ca43cac833937e1bff2728fa4074d8c0540323ba.tar.zst
mailman-ca43cac833937e1bff2728fa4074d8c0540323ba.zip
Last cleanups.
* Remove an unused import. * Opportunistically remove ^Ls * Add a missing interface attribute. * Fix up some docstrings. * Rename a parameter in an interface for clarity. * Random code style cleanups.
Diffstat (limited to 'src/mailman/rest/docs')
-rw-r--r--src/mailman/rest/docs/listconf.rst24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mailman/rest/docs/listconf.rst b/src/mailman/rest/docs/listconf.rst
index 5e32844de..8b65f58f0 100644
--- a/src/mailman/rest/docs/listconf.rst
+++ b/src/mailman/rest/docs/listconf.rst
@@ -314,6 +314,7 @@ The list of header matches for a mailing list are returned on the
total_size: 0
New header matches can be created by POSTing to the resource.
+::
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches', {
@@ -335,10 +336,11 @@ New header matches can be created by POSTing to the resource.
self_link: http://localhost:9001/3.0/lists/ant.example.com/header-matches/0
To follow the global antispam action, the header match rule must not specify
-an ``action`` key. If the default antispam action is changed in the
-configuration file and Mailman is restarted, those rules will get the new
-jump action. If a specific action is desired, the ``action`` key must point
-to a valid action.
+an ``action`` key, which names the chain to jump to if the rule matches. If
+the default antispam action is changed in the configuration file and Mailman
+is restarted, those rules will get the new jump action. If a specific action
+is desired, the ``action`` key must name a valid chain to jump to.
+::
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches', {
@@ -364,6 +366,7 @@ to a valid action.
The resource can be changed by PATCHing it. The ``position`` key can be used
to change the priority of the header match in the list. If it is not supplied,
the priority is not changed.
+::
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches/1',
@@ -398,19 +401,20 @@ the priority is not changed.
http_etag: "..."
pattern: ^No
position: 0
- self_link: http://localhost:9001/3.0/lists/ant.example.com/header-matches/0
+ self_link: .../lists/ant.example.com/header-matches/0
entry 1:
header: x-spam-flag
http_etag: "..."
pattern: ^Yes
position: 1
- self_link: http://localhost:9001/3.0/lists/ant.example.com/header-matches/1
+ self_link: .../lists/ant.example.com/header-matches/1
http_etag: "..."
start: 0
total_size: 2
The PUT method can replace an entire header match. The ``position`` key is
-optional: if it is omitted, the order will not be changed.
+optional; if it is omitted, the order will not be changed.
+::
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches/1',
@@ -433,6 +437,7 @@ optional: if it is omitted, the order will not be changed.
self_link: http://localhost:9001/3.0/lists/ant.example.com/header-matches/1
A header match can be removed using the DELETE method.
+::
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches/1',
@@ -440,6 +445,7 @@ A header match can be removed using the DELETE method.
content-length: 0
...
status: 204
+
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches')
entry 0:
@@ -448,13 +454,14 @@ A header match can be removed using the DELETE method.
http_etag: "..."
pattern: ^No
position: 0
- self_link: http://localhost:9001/3.0/lists/ant.example.com/header-matches/0
+ self_link: .../lists/ant.example.com/header-matches/0
http_etag: "..."
start: 0
total_size: 1
The mailing list's header matches can be cleared by issuing a DELETE request on
the top resource.
+::
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches',
@@ -462,6 +469,7 @@ the top resource.
content-length: 0
...
status: 204
+
>>> dump_json('http://localhost:9001/3.0/lists/ant.example.com'
... '/header-matches')
http_etag: "..."