python-musicbrainzngs icon indicating copy to clipboard operation
python-musicbrainzngs copied to clipboard

automatic paging

Open alastair opened this issue 14 years ago • 2 comments

Browse requests and searches support paging. We should return from these requests an object that gives the results, with an easy method to call to get the next set of results.

An option might be to make these responses iterable so that you can just call next() on them and paging will happen magically in the background

alastair avatar Aug 10 '11 03:08 alastair

I like the idea of returning an iterable from these functions. That would be a great way to provide pagination to clients of the library -- I imagine it working sort of like cursors in Python's DBAPI standard. It would be nice, though, to let programs know when the next call to next() will need to make a new request -- or to optionally disable automatic fetching when only a few results are needed.

sampsyo avatar Aug 10 '11 06:08 sampsyo

I'd say #101 should be fixed before or along this. The user really should know how many pages to expect.

JonnyJD avatar Apr 19 '13 09:04 JonnyJD