Skip to content

Commit

Permalink
AdYouLike Bidder - Add size in video bid (prebid#8282)
Browse files Browse the repository at this point in the history
* add required clickurl in every native adrequest

* allows the native response to be given as is to prebid if possible

* add unit tests on new Native case

* Handle meta object in bid response with default addomains array

* fix icon retrieval in Native case

* Update priorities in case of multiple mediatypes given

* improve robustness and fix associated unit test on picture urls

* add support for params.size parameter

* add unit test on new size format

* Makes sure the playerSize format is consistent

* enable Vast response on bidder adapter

* fix lint errors

* add test on Vast format case

* add userId to bidrequest

* revert package-lock.json changes

* improve multiple mediatype handling

* Expose adyoulike GVL id

* fix icurl issue when retreiving icon for Native mediatype

* update unit tests on icon url in native mediatype

* target video endpoint when video mediatype is present

* add unit test on video endpoint

* detect if bid request has video

* remove console log

* Add size information in Video bid + unit tests
  • Loading branch information
guiann authored and JoelPM committed Apr 25, 2022
1 parent 4a2d878 commit babfe9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ function createBid(response, bidRequests) {
// retreive video response if present
const vast64 = response.Vast || getVideoAd(response);
if (vast64) {
bid.width = response.Width;
bid.height = response.Height;
bid.vastXml = window.atob(vast64);
bid.mediaType = 'video';
} else if (request.Native) {
Expand Down
7 changes: 5 additions & 2 deletions test/spec/modules/adyoulikeBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,21 +462,24 @@ describe('Adyoulike Adapter', function () {
'Placement': 'placement_0',
'Vast': 'PFZBU1Q+RW1wdHkgc2FtcGxlPC92YXN0Pg==',
'Price': 0.5,
'Height': 600,
'Height': 300,
'Width': 530
}];

const videoResult = [{
cpm: 0.5,
creativeId: undefined,
currency: 'USD',
height: 300,
netRevenue: true,
requestId: 'bid_id_0',
ttl: 3600,
mediaType: 'video',
meta: {
advertiserDomains: []
},
vastXml: '<VAST>Empty sample</vast>'
vastXml: '<VAST>Empty sample</vast>',
width: 530
}];

const responseWithMultiplePlacements = [
Expand Down

0 comments on commit babfe9c

Please sign in to comment.