We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the following code snippet:
import logging from appnexus import Campaign, connect logging.basicConfig() logging.getLogger("appnexus-client").setLevel(logging.DEBUG) connect('XXXXXXXXXX', 'XXXXXXXXXX') def gather(cursor): print("----------") print("Cursor.before:\tskip={}, limit={}".format(cursor._skip, cursor._limit)) results = [res for res in cursor] print("Results:\t{}".format(len(results))) print("Cursor.after:\tskip={}, limit={}".format(cursor._skip, cursor._limit)) cursor = Campaign.find(advertiser_id=XXXXXXXXXX) cursor.skip(10) gather(cursor)
The following will be outputted (authentication-related logs redacted):
---------- Cursor.before: skip=100, limit=inf DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=0&num_elements=1 None DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=0&num_elements=100 None DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=100&num_elements=100 None DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=200&num_elements=100 None Results: 128 Cursor.after: skip=0, limit=inf ---------- Cursor.before: skip=0, limit=inf DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=0&num_elements=1 None DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=0&num_elements=100 None DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=100&num_elements=100 None DEBUG:appnexus-client:{'Authorization': 'XXXXXXXXXX'} https://api.appnexus.com/campaign?advertiser_id=XXXXXXXXXX&start_element=200&num_elements=100 None Results: 228 Cursor.after: skip=0, limit=inf
I believe that a value to skip should be set once and maintain during the lifetime of the cursor instance, or at least until it is set again.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using the following code snippet:
The following will be outputted (authentication-related logs redacted):
I believe that a value to skip should be set once and maintain during the lifetime of the cursor instance, or at least until it is set again.
The text was updated successfully, but these errors were encountered: