Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdYouLike Bidder - enable Vast response format #7229

Merged
merged 26 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5fb2f8f
Merge remote-tracking branch 'origin/master'
guiann Apr 14, 2021
f07f989
Merge remote-tracking branch 'origin/master'
guiann Apr 30, 2021
7cf8fb1
add required clickurl in every native adrequest
guiann Apr 30, 2021
cb45b27
allows the native response to be given as is to prebid if possible
guiann May 25, 2021
c57af68
add unit tests on new Native case
guiann May 26, 2021
bfb6101
Merge branch 'forceClickUrl'
guiann May 26, 2021
df7e7bc
Merge remote-tracking branch 'origin/master'
guiann May 27, 2021
979dbb5
Merge remote-tracking branch 'origin/master'
guiann May 31, 2021
77000a4
Merge remote-tracking branch 'Adyoulike/master'
guiann May 31, 2021
00df091
Handle meta object in bid response with default addomains array
guiann May 31, 2021
9ed3845
Merge remote-tracking branch 'Adyoulike/master'
guiann Jun 1, 2021
97bd819
fix icon retrieval in Native case
guiann Jun 17, 2021
7897e6a
Update priorities in case of multiple mediatypes given
guiann Jun 17, 2021
9e8968b
merge master branch
guiann Jun 17, 2021
bbee6cc
improve robustness and fix associated unit test on picture urls
guiann Jun 17, 2021
0f3aa09
Merge remote-tracking branch 'origin/master'
guiann Jul 20, 2021
3e7201c
add support for params.size parameter
guiann Jul 20, 2021
89c5d24
Merge remote-tracking branch 'Adyoulike/master'
guiann Jul 20, 2021
13da01b
add unit test on new size format
guiann Jul 20, 2021
e87b7a9
Merge remote-tracking branch 'origin/master'
guiann Jul 26, 2021
dc609d7
Makes sure the playerSize format is consistent
guiann Jul 28, 2021
41198fc
Merge remote-tracking branch 'Adyoulike/master'
guiann Jul 28, 2021
8afe053
enable Vast response on bidder adapter
guiann Jul 28, 2021
d60f235
fix lint errors
guiann Jul 28, 2021
3315a72
Merge remote-tracking branch 'origin/master'
guiann Jul 28, 2021
bd7551f
add test on Vast format case
guiann Jul 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ function getNativeAssets(response, nativeConfig) {

/* Create bid from response */
function createBid(response, bidRequests) {
if (!response || (!response.Ad && !response.Native)) {
if (!response || (!response.Ad && !response.Native && !response.Vast)) {
return
}

Expand Down
41 changes: 41 additions & 0 deletions test/spec/modules/adyoulikeBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ describe('Adyoulike Adapter', function () {
}
};

const sentBidVideo = {
'bid_id_0': {
'PlacementID': 'e622af275681965d3095808561a1e510',
'TransactionID': 'e8355240-d976-4cd5-a493-640656fe08e8',
'AvailableSizes': '',
'Video': {
playerSize: [640, 480]
}
}
};

const sentNativeImageType = {
'additional': {
'sent': [
Expand Down Expand Up @@ -382,6 +393,28 @@ describe('Adyoulike Adapter', function () {
meta: testMetaObject
}];

const responseWithSingleVideo = [{
'BidID': 'bid_id_0',
'Placement': 'placement_0',
'Vast': 'PFZBU1Q+RW1wdHkgc2FtcGxlPC92YXN0Pg==',
'Price': 0.5,
'Height': 600,
}];

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

const responseWithMultiplePlacements = [
{
'BidID': 'bid_id_0',
Expand Down Expand Up @@ -689,5 +722,13 @@ describe('Adyoulike Adapter', function () {

expect(result).to.deep.equal(noMeta);
});

it('receive Vast reponse with Video ad', function () {
serverResponse.body = responseWithSingleVideo;
let result = spec.interpretResponse(serverResponse, {data: '{"Bids":' + JSON.stringify(sentBidVideo) + '}'});

expect(result.length).to.equal(1);
expect(result).to.deep.equal(videoResult);
});
});
});