Of course, sending simple request parameters to the server is easy, in
every library
(using Dan's CURL client example)
```
URL="http://controllerdemo-danbev.rhcloud.com/aerogear-controller-de...
curl -i --header "Accept: application/json"
"$URL/cars?page=0&perPage=4"
```
In terms of an client API, that wants to scroll through the cars (like
in this demo), I was wondering if some "PagingContext" (or
"ResultSet") API is needed...
// issues a request with ?page=0&perPage=4
PagingContext pc = client.request(someCars...);
// issues a request with ?page=0&perPage=4
pc.next()
// issues a request with ?page=1&perPage=4
pc.next()
// issues a request with ?page=0&perPage=4
pc.back()
NOT sure, but IMO a little higher level abstraction would be nice,
instead of having the end users of the "paging API" applying the
values for 'page' and 'perPage' manually.
Any thoughts? (Not sure if this has been brought up before)
-M
On Fri, Jan 11, 2013 at 12:39 PM, Matthias Wessendorf <matzew(a)apache.org> wrote:
Hi,
was there already some discussion (and proposal) for paging APIs on the client ?
It would be nice if the public client API semantics are somewhat
identical on the different platforms.
(I guess it's a MUST :))
Any pointers to gists etc are welcome
Thx
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf