Need more code examples for paging

There are no code examples in the docs for next-page processing. How are parameters passed to a query? What is the structure of the return?