ApiClient now takes a stop-condition

Instead of just setting the number of pages to load, the client now
takes a filter and will paginate until the condition fails.