Skip to content
New issue

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

Upgrade Audience Network adapter for Prebid 1.0 #1750

Merged
merged 1 commit into from
Oct 26, 2017

Conversation

lovell
Copy link
Contributor

@lovell lovell commented Oct 23, 2017

As requested by @mjacobsonny and paid for by Facebook.

In addition to 100% unit test branch coverage, I've manually tested this using pbjs_debug=true and everything appears to be working end-to-end.

The two biggest gotchas I ran into that required me to dig into the new Prebid source code to determine expected behaviour were:

  1. The inconsistent properties (type=method, endpoint=url?) of the ServerRequest expected from buildRequests() documented at http://prebid.org/dev-docs/bidder-adapter-1.html#building-the-request
  2. The need to include the original bidId passed to buildRequests() as the differently-named requestId property of the bidObject returned by interpretResponse().

Copy link
Contributor

@dbemiller dbemiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @lovell, can you make these changes against master? It'll reduce merge conflicts and make the branches easier for us to maintain during the 1.0 transition.

Thanks!

const bidResponse = {
// Prebid attributes
requestId,
bidderCode: code,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some subtle reasons, you shouldn't set bidderCode in here. It breaks adapter aliasing.

Our docs have been updated to reflect this... but sorry for the confusion all the same.

@dbemiller dbemiller self-assigned this Oct 24, 2017
@lovell lovell force-pushed the audience-network-prebid-1.0 branch from 0b7645e to db35f30 Compare October 24, 2017 19:16
@lovell lovell changed the base branch from prebid-1.0 to master October 24, 2017 19:17
@dbemiller
Copy link
Contributor

agh... sorry about this, but one more change, because #1742 got merged before we could get this in.

The first argument to interpretResponse has been changed, and now looks like this:

{
  body: responseBody,
  headers: {
    get: function(header) { /* returns a header from the HTTP response */ }
  }
}

Could you also pull master and update that?

@lovell lovell force-pushed the audience-network-prebid-1.0 branch from db35f30 to 2400b57 Compare October 25, 2017 10:02
@lovell
Copy link
Contributor Author

lovell commented Oct 25, 2017

Updated and rebased against master but other, unrelated unit tests are failing at the moment.

@dbemiller dbemiller added the LGTM label Oct 25, 2017
@dbemiller dbemiller merged commit 403a991 into prebid:master Oct 26, 2017
@lovell lovell deleted the audience-network-prebid-1.0 branch October 27, 2017 12:16
mattpr pushed a commit to mattpr/Prebid.js that referenced this pull request Oct 31, 2017
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants