From 70a3cf2ad5db94757addd9e08c3a083caca282d0 Mon Sep 17 00:00:00 2001 From: Tim Sturtewagen Date: Mon, 26 Oct 2020 14:23:13 +0100 Subject: [PATCH] adpod category support test --- modules/adheseBidAdapter.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/adheseBidAdapter.js b/modules/adheseBidAdapter.js index 80758668a95..4de1f31f330 100644 --- a/modules/adheseBidAdapter.js +++ b/modules/adheseBidAdapter.js @@ -1,7 +1,7 @@ 'use strict'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import { BANNER, VIDEO } from '../src/mediaTypes.js'; +import { BANNER, VIDEO, ADPOD } from '../src/mediaTypes.js'; const BIDDER_CODE = 'adhese'; const GVLID = 553; @@ -97,16 +97,25 @@ function adResponse(bid, ad) { adhese: { originData: adDetails.originData, origin: adDetails.origin, - originInstance: adDetails.originInstance + originInstance: adDetails.originInstance, } }); if (bidResponse.mediaType === VIDEO) { + bidResponse.meta = { + primaryCatId: 'IAB2-10', + adServerCatId: 399 + } bidResponse.vastXml = markup; + bidResponse.video = { + context: ADPOD, + durationSeconds: 30 + } } else { const counter = ad.impressionCounter ? "" : ''; bidResponse.ad = markup + counter; - } + } + return bidResponse; } @@ -193,7 +202,8 @@ function getAdDetails(ad) { if (isAdheseAd(ad)) { creativeId = ad.id; dealId = ad.orderId; - originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id }; + originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id + }; } else { creativeId = ad.origin + (ad.originInstance ? '-' + ad.originInstance : ''); if (ad.originData) {