Skip to content

Commit

Permalink
Onevideo adapter version param support (prebid#4826)
Browse files Browse the repository at this point in the history
* adding version params

* test cases for version

* removing console log
  • Loading branch information
DeepthiNeeladri authored and hellsingblack committed Mar 5, 2020
1 parent 27758fd commit 8cf597a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/oneVideoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory';
const BIDDER_CODE = 'oneVideo';
export const spec = {
code: 'oneVideo',
VERSION: '3.0.0',
ENDPOINT: 'https://ads.adaptv.advertising.com/rtb/openrtb?ext_id=',
SYNC_ENDPOINT1: 'https://cm.g.doubleclick.net/pixel?google_nid=adaptv_dbm&google_cm&google_sc',
SYNC_ENDPOINT2: 'https://pr-bh.ybp.yahoo.com/sync/adaptv_ortb/{combo_uid}',
Expand Down Expand Up @@ -153,6 +154,8 @@ function getRequestData(bid, consentData, bidRequest) {
bidfloor: bid.params.bidfloor,
ext: {
hb: 1,
prebidver: '$prebid.version$',
adapterver: spec.VERSION,
}
}],
site: {
Expand Down Expand Up @@ -246,6 +249,7 @@ function getRequestData(bid, consentData, bidRequest) {
}
};
}
// ccpa support
if (bidRequest && bidRequest.uspConsent) {
bidData.regs.ext.us_privacy = bidRequest.uspConsent
}
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/oneVideoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,15 @@ describe('OneVideoBidAdapter', function () {
const placement = bidRequest.params.video.placement;
const rewarded = bidRequest.params.video.rewarded;
const inventoryid = bidRequest.params.video.inventoryid;
const VERSION = '3.0.0';
expect(data.imp[0].video.w).to.equal(width);
expect(data.imp[0].video.h).to.equal(height);
expect(data.imp[0].bidfloor).to.equal(bidRequest.params.bidfloor);
expect(data.imp[0].ext.rewarded).to.equal(rewarded);
expect(data.imp[0].video.placement).to.equal(placement);
expect(data.imp[0].ext.inventoryid).to.equal(inventoryid);
expect(data.imp[0].ext.prebidver).to.equal('$prebid.version$');
expect(data.imp[0].ext.adapterver).to.equal(VERSION);
});

it('must parse bid size from a nested array', function () {
Expand Down

0 comments on commit 8cf597a

Please sign in to comment.