Mercurial > p > roundup > code
annotate doc/index.txt @ 5639:f576957cbb1f
Add support for prev/next/self links when returning paginated results.
To do this:
1) change "data" envelope from an array to a dict
2) move the "data" array to the "collection" property,
which is an array of elements in the collection.
3) add @links dict keyed by link relation: self, next, prev.
Each relation is an array of dicts with uri and rel keys.
In this case there is only one element, but there is nothing
preventing a relation from having multiple url's. So this follows
the formatting needed for the general case.
Relations are present only if it makes sense. So first page has no
prev and last page has no next.
4) add @total_size with number of element selected if they were
not paginated. Replicates data in X-Count-Total header.
Changed index to start at 1. So the first page is page_index 1 and not
page_index 0. (So I am no longer surprised when I set page_index to 1
and am missing a bunch of records 8-)).
Also a small fixup, json response ends with a newline so printing
the data, or using curl makes sure that anything printing after the
json output (like shell prompts) is on a new line.
Tests added for all cases.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 09 Mar 2019 11:06:10 -0500 |
| parents | 487dc55e3c5e |
| children | 3e1b66c4e1e2 |
| rev | line source |
|---|---|
|
686
c52122f38c9b
Documentation cleanup, added info for potential (and current) developers
Richard Jones <richard@users.sourceforge.net>
parents:
659
diff
changeset
|
1 ======================================================= |
|
c52122f38c9b
Documentation cleanup, added info for potential (and current) developers
Richard Jones <richard@users.sourceforge.net>
parents:
659
diff
changeset
|
2 Roundup: an Issue-Tracking System for Knowledge Workers |
|
c52122f38c9b
Documentation cleanup, added info for potential (and current) developers
Richard Jones <richard@users.sourceforge.net>
parents:
659
diff
changeset
|
3 ======================================================= |
|
659
e429649ed124
More documentation cleanups.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
4 |
|
4610
e793eafba69c
Documentation: Synced the doc/index.txt and docs.txt. Removed outdated contact.txt.
Bernhard Reiter <bernhard@intevation.de>
parents:
4440
diff
changeset
|
5 For how to contact the community see http://www.roundup-tracker.org . |
|
e793eafba69c
Documentation: Synced the doc/index.txt and docs.txt. Removed outdated contact.txt.
Bernhard Reiter <bernhard@intevation.de>
parents:
4440
diff
changeset
|
6 |
|
659
e429649ed124
More documentation cleanups.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
7 Contents |
|
e429649ed124
More documentation cleanups.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
8 ======== |
|
e429649ed124
More documentation cleanups.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
9 |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
10 .. toctree:: |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
11 :maxdepth: 2 |
|
659
e429649ed124
More documentation cleanups.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
13 features |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
14 installation |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
15 upgrading |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
16 FAQ |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
17 user_guide |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
18 customizing |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
19 admin_guide |
|
5078
487dc55e3c5e
issue2550907 Fix errors when creating documentation. Work done by
John Rouillard <rouilj@ieee.org>
parents:
4890
diff
changeset
|
20 debugging |
|
4440
7c576a4dea9d
XML-RPC documentation now linked from the docs/index
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
4033
diff
changeset
|
21 xmlrpc |
|
5078
487dc55e3c5e
issue2550907 Fix errors when creating documentation. Work done by
John Rouillard <rouilj@ieee.org>
parents:
4890
diff
changeset
|
22 overview |
|
4890
609edf9de0a5
docs: Remove one nesting level from ToC on subpages
anatoly techtonik <techtonik@gmail.com>
parents:
4746
diff
changeset
|
23 Design (original) <design> |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
24 developers |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
25 tracker_templates |
|
5078
487dc55e3c5e
issue2550907 Fix errors when creating documentation. Work done by
John Rouillard <rouilj@ieee.org>
parents:
4890
diff
changeset
|
26 Notes about the MySQL Database backend <mysql> |
|
487dc55e3c5e
issue2550907 Fix errors when creating documentation. Work done by
John Rouillard <rouilj@ieee.org>
parents:
4890
diff
changeset
|
27 Notes about the PostgreSQL Database backend <postgresql> |
|
4746
25fcb87a8301
Link glossary to the documentation contents.
anatoly techtonik <techtonik@gmail.com>
parents:
4610
diff
changeset
|
28 glossary |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
29 acknowledgements |
|
5078
487dc55e3c5e
issue2550907 Fix errors when creating documentation. Work done by
John Rouillard <rouilj@ieee.org>
parents:
4890
diff
changeset
|
30 Richard Jones implementation notes <implementation> |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4000
diff
changeset
|
31 license |
