Skip to content

Commit

Permalink
SmartytechBidAdapter: Add meta (#11815)
Browse files Browse the repository at this point in the history
* Add mediaimpact bid adapter

* Add mediaimpact bid adapter tests

* Add custom sizes

* Refactor response meta

* mediaimpact adapter fix tests

* SmartytechBidAdapter: Add meta

* MediaimpactBidAdapter: Fix tests

* MediaimpactBidAdapter: Fix tests

* Add meta to tests

* rerun tests

* rerun tests

---------

Co-authored-by: koshe <[email protected]>
  • Loading branch information
nalexand and koshe committed Jun 19, 2024
1 parent ede12d2 commit 4bf11bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 7 additions & 2 deletions modules/smartytechBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,19 @@ export const spec = {
creativeId: response.creativeId,
netRevenue: true,
currency: response.currency,
mediaType: BANNER
}
mediaType: BANNER,
meta: {}
};

if (response.mediaType === VIDEO) {
bidObject.vastXml = response.ad;
bidObject.mediaType = VIDEO;
}

if (response.meta) {
bidObject.meta = response.meta;
}

return bidObject;
},

Expand Down
6 changes: 5 additions & 1 deletion test/spec/modules/smartytechBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ function mockResponseData(requestData) {
creativeId: `creative-id-${index}`,
cpm: Math.floor(Math.random() * 100),
currency: `UAH-${rndIndex}`,
mediaType: mediaType
mediaType: mediaType,
meta: {
primaryCatId: 'IAB2-2',
secondaryCatIds: ['IAB2-14', 'IAB2-6']
}
};
});
return {
Expand Down

0 comments on commit 4bf11bd

Please sign in to comment.