UserPreferences

PaceProtocolPaging


Rationale

Client-controlled paging is an asset which helps reduce bandwidth and scanning.

Proposal

This Pace gives the editors carte blanche to change the field names as they see fit, so any spam about field names should be directed to them directly, rather than the atom-protocol list.

Client Paging

Some clients require more precise control over the server's response. For example, the client might wish to construct a record of the collection's complete membership without generating a very large number of requests.

None of the parameters are required.

Example Select Template

http://example.com/foo?begin=2003-12-13T18:30:02Z&end=2003-12-25T18:30:02Z&offset=2&count=4
Example Code

Example Python Code:

import re
uri = "http://www.example.com/{foo/|END|/hmm/}test?foo=bar{&begin=|BEGIN|}{&offset=|OFFSET|}{&count=|COUNT|}&baz=qux"

# Python sample using non-greedy wildcards
regex = r'(\{((.*?)\|(.*?)\|(.*?))\})'
fields = re.compile(regex).findall(uri,0)

for field in fields:
    uri = re.sub(re.escape(field[0]),field[2]+"BOOYA"+field[4],uri)
    print uri

Output:

http://www.example.com/foo/BOOYA/hmm/test?foo=bar{&begin=|BEGIN|}{&offset=|OFFSET|}{&count=|COUNT|}&baz=qux
http://www.example.com/foo/BOOYA/hmm/test?foo=bar&begin=BOOYA{&offset=|OFFSET|}{&count=|COUNT|}&baz=qux
http://www.example.com/foo/BOOYA/hmm/test?foo=bar&begin=BOOYA&offset=BOOYA{&count=|COUNT|}&baz=qux
http://www.example.com/foo/BOOYA/hmm/test?foo=bar&begin=BOOYA&offset=BOOYA&count=BOOYA&baz=qux

Notes

See also: PacePostTemplate, PaceXoXoIntrospection