modify handlers to accept query string

We should maybe say here that cursor is an ``opaque string`` and that when a cursor of ``None`` is returned it means that we've reached the last page? Maybe we should document the return value (that would cover the latter).