question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fetch all `hb_pb` values via pagination

See original GitHub issue

We should fetch all existing hb_pb values. Currently, we’re not paginating queries in get_targeting_by_key_name, so we only fetch the maximum number of items DFP returns in one request. This causes the error in #28 if the DFP account has lots of hb_pb values.

See the DFP example here for pagination.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jsonUKcommented, Jan 19, 2018

FYI, I have created a pull request with this code change. I hope others find it useful. Thank you for open sourcing this project.

1reaction
SleepiestAdamcommented, Oct 25, 2017

For anyone after a quick and hacky fix after having deactivated hb_pb values… It currently is pulling even deactivated values which uses up the 500 limit and causes an error.

You can fix this by changing line 82 of get_custom_targeting.py in the dfp folder to:

query = "WHERE status = 'ACTIVE' AND customTargetingKeyId IN (%s)" % str(key['id'])

So it only queries active hb_pb values.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Retrieve All Data via Paginated API Calls in Vanilla ...
In order to render all bus stops on the first load, it was necessary to first aggregate all paginated data chunks on the...
Read more >
Making a Paginated fetch() call in JavaScript - Observable
This post demos how to make a paginated API request using a recursive function. Click here if you want to see how I...
Read more >
Fetch all data at once with pagination value in response using ...
I'm trying to fetch pagination data all at once from a server with RxJava in Android App, but can't find the right solution....
Read more >
RXJS Fetch All Paginated Data - Da Feng
In this article, we will talk about how to fecth all paginated data and return as a single observable and how to solve...
Read more >
Retrieve entire data from paginated API recursively.
In this post i am going to show to retrieve data from a paginated API using recursive method. To explain the functionality, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found