diff options
| author | Aurélien Bompard | 2016-05-19 17:06:58 +0200 |
|---|---|---|
| committer | Barry Warsaw | 2016-10-26 08:39:07 -0400 |
| commit | 72197b0ca012c55b290230d846c6a65314c6fe05 (patch) | |
| tree | bf2c1ee87c02592ca37d717033b44c6180b84524 /src/mailman/rest/docs | |
| parent | 6c1e74d93212ee6922ea8500dbecb4cf2eff1114 (diff) | |
| download | mailman-72197b0ca012c55b290230d846c6a65314c6fe05.tar.gz mailman-72197b0ca012c55b290230d846c6a65314c6fe05.tar.zst mailman-72197b0ca012c55b290230d846c6a65314c6fe05.zip | |
REST: add a query string to only get advertised lists
Diffstat (limited to 'src/mailman/rest/docs')
| -rw-r--r-- | src/mailman/rest/docs/lists.rst | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/mailman/rest/docs/lists.rst b/src/mailman/rest/docs/lists.rst index 6554b04c2..eb8314704 100644 --- a/src/mailman/rest/docs/lists.rst +++ b/src/mailman/rest/docs/lists.rst @@ -49,6 +49,33 @@ You can also query for lists from a particular domain. start: 0 total_size: 1 +Advertised lists can be filtered using the ``only_advertised`` query parameter. +:: + + >>> mlist = create_list('bird@example.com') + >>> mlist.advertised = False + >>> transaction.commit() + + >>> dump_json('http://localhost:9001/3.0/lists?only_advertised=true') + entry 0: + ... + list_id: ant.example.com + ... + http_etag: "..." + start: 0 + total_size: 1 + +The same applies to lists from a particular domain. + + >>> dump_json('http://localhost:9001/3.0/domains/example.com/lists?only_advertised=true') + entry 0: + ... + list_id: ant.example.com + ... + http_etag: "..." + start: 0 + total_size: 1 + Paginating over list records ---------------------------- @@ -59,9 +86,6 @@ request URI. Page 1 is the first page and ``count`` defines the size of the page. :: - >>> mlist = create_list('bird@example.com') - >>> transaction.commit() - >>> dump_json('http://localhost:9001/3.0/domains/example.com/lists' ... '?count=1&page=1') entry 0: |
