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

Update Adform adapter to Prebid v1.0 #1947

Merged
merged 13 commits into from
Jan 10, 2018
Merged

Conversation

Pupis
Copy link
Contributor

@Pupis Pupis commented Dec 11, 2017

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other

Description of change

Update Adform adapter to Prebid v1.0

_key = globalParams[j][0];
_value = bid[_key] || bid.params[_key];
if (_value) {
bid[_key] = bid.params[_key] = null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you mutating the bids? Is there a way you can do this without mutating the original bid objects?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, changes were made to avoid mutating original bid objects.

return encode64(url.join('').slice(0, -1));
}

function encode64(input) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a reason you are manually performing base64 encoding over using native btoa?

Copy link
Collaborator

@snapwich snapwich left a comment

Choose a reason for hiding this comment

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

LGTM

@ndhimehta ndhimehta added the LGTM label Dec 21, 2017
return !!(bid.params.mid);
},
buildRequests: function (validBidRequests) {
var i, l, j, k, bid, _key, _value, reqParams;
Copy link
Member

Choose a reason for hiding this comment

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

nit: prefer const | let

var request = [];
var globalParams = [ [ 'adxDomain', 'adx.adform.net' ], [ 'fd', 1 ], [ 'url', null ], [ 'tid', null ] ];
var netRevenue = 'net';
var bids = JSON.parse(JSON.stringify(validBidRequests));
Copy link
Member

Choose a reason for hiding this comment

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

we have a copy function in utils deepClone that could be used. Although this is probably fine.

@mkendall07 mkendall07 merged commit 9f3f16f into prebid:master Jan 10, 2018
chanand pushed a commit to chanand/Prebid.js that referenced this pull request Jan 18, 2018
* test

* update adform bid adapter

* update unit tests

* Added adform adapter description file

* updated tests

* Another tests update

* add auctionId to adformBidAdapter

* Final updates to fit 1.0 version

* update docs and integration example

* Do not mutate original validBidRequests

* use atob and btoa instead of custom made module

* Renaming one query string parameter
Millerrok pushed a commit to Vertamedia/Prebid.js that referenced this pull request Jan 23, 2018
* 'master' of https://github.com/prebid/Prebid.js: (23 commits)
  Update Atomx adapter for Prebid v1.0 (prebid#2026)
  Add vi bid adapter (prebid#2020)
  Add eplanningBidAdapter (prebid#2003)
  OpenX Adapter: Update to support mediaTypes field, instead of the deprecated mediaType field (prebid#1974)
  Separate bids & won calls (prebid#2015)
  1.0 adapter support for mantis (prebid#1840)
  Media.net adapter added (prebid#2038)
  GumGum Adapter for Prebid.js 1.0 (prebid#1966)
  Serverbid Bid Adapter: updated docs and ad sizes (prebid#2023)
  Adding districtm as an alias (prebid#2018)
  Use sudo to workaround Travis regression (prebid#2041)
  Fix uncached video bids triggering callback early (prebid#2017)
  Re-implemented RhythmOne audit beacon in prebid 1.0 interface (prebid#1953)
  Add NasmediaAdmixer adapter for Perbid.js 1.0 (prebid#1937)
  Update Adform adapter to Prebid v1.0 (prebid#1947)
  Upgrade Admixer adapter for Prebid 1.0 (prebid#1755)
  multiformat size validation checks (prebid#1964)
  Gjirafa Bidder Adapter (prebid#1944)
  pin gulp-connect at non-broken version (prebid#2008)
  Added dynamic ttl property for One Display and One Mobile. (prebid#2004)
  ...
@rmloveland
Copy link
Contributor

Added the needs-docs label since it's not showing up on http://prebid.org/download.html in the 1.2.0 dropdown due to lack of the page having the "prebid 1.0 support" key in the page's YAML header.

Let me know if there is another better way to do this.

dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* test

* update adform bid adapter

* update unit tests

* Added adform adapter description file

* updated tests

* Another tests update

* add auctionId to adformBidAdapter

* Final updates to fit 1.0 version

* update docs and integration example

* Do not mutate original validBidRequests

* use atob and btoa instead of custom made module

* Renaming one query string parameter
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.

5 participants