numberly / appnexus-client

:snake: General purpose Python client for the AppNexus API
https://appnexus-client.readthedocs.io
MIT License
39 stars 19 forks source link

Reduce requests volume while iterating on a cursor #40

Closed shnups closed 5 years ago

shnups commented 5 years ago

This addresses issue #39.

Implementation details: Replaced a call to cursor.count() by a forced iteration to get the first page and then deciding to keep iterating based on the count received in that first page. Added unit test that validate that we did the right number of roundtrip to AppNexus. Fixed a minor UnboundLocalError in unit test's helper functions. Added .vscode to .gitgnore Updated versions of pytest + plugins

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.03%) to 87.147% when pulling 47e1ef85a30916673d1efdbdd3fba1fc96fa79be on shnups:improvement/reduce_request_volume into 64013debe23c03a19c186ac46683a753c49e8483 on numberly:master.

ramnes commented 5 years ago

Great, thanks!