Update Adform adapter to Prebid v1.0#1947
Conversation
# Conflicts: # modules/adformBidAdapter.js # test/spec/modules/adformBidAdapter_spec.js
| _key = globalParams[j][0]; | ||
| _value = bid[_key] || bid.params[_key]; | ||
| if (_value) { | ||
| bid[_key] = bid.params[_key] = null; |
There was a problem hiding this comment.
Why are you mutating the bids? Is there a way you can do this without mutating the original bid objects?
There was a problem hiding this comment.
Hi, changes were made to avoid mutating original bid objects.
modules/adformBidAdapter.js
Outdated
| return encode64(url.join('').slice(0, -1)); | ||
| } | ||
|
|
||
| function encode64(input) { |
There was a problem hiding this comment.
is there a reason you are manually performing base64 encoding over using native btoa?
| return !!(bid.params.mid); | ||
| }, | ||
| buildRequests: function (validBidRequests) { | ||
| var i, l, j, k, bid, _key, _value, reqParams; |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
we have a copy function in utils deepClone that could be used. Although this is probably fine.
* '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) ...
|
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. |
Type of change
Description of change
Update Adform adapter to Prebid v1.0
Scope.FL.Scripts@adform.com