appnexus-client icon indicating copy to clipboard operation
appnexus-client copied to clipboard

Improvement/revamp cursor iteration

Open shnups opened this issue 6 years ago • 1 comments

Address issue #41, #42 and #43.

I tried to work around the current design in master to fix all corner cases but was unable to do that and, at the same time, actually taking into account the skip/limit at the url level.

Most 'limited' fixes (changing as little code as possible) would have required some sort of duplication of code between cursor.__iter__ to cursor.iter_pages and shared responsibilities of the skip/limit logic. I felt that it was cleaner to centralize that logic in one place and that this place had to be the one closer to the api calls.

Therefore, the skip/limit logic has been moved from cursor.__iter__ to cursor.iter_pages so that query parameters used to query AppNexus are actually impacted by the user's configuration.

shnups avatar Oct 21 '19 15:10 shnups

Coverage Status

Coverage increased (+2.007%) to 89.153% when pulling 2deb232f1c80f1568b7cd9c41ce88b8a194648cc on shnups:improvement/revamp-cursor-iteration into 77784032b8bd3dee777fb7bc716de0fde08e7f43 on numberly:master.

coveralls avatar Oct 21 '19 15:10 coveralls