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

vidazoo Bid Adapter: update support of metaData #9749

Merged
merged 39 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d1cf0a6
feat(module): multi size request
uditalias Mar 19, 2020
1f9521d
fix getUserSyncs
shmoop207 Mar 24, 2020
8c23b90
update(module): package-lock.json from master
uditalias Mar 24, 2020
84df14e
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Apr 12, 2020
bdeebe4
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 8, 2020
8b343ce
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 17, 2020
3964277
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 1, 2020
5c82e8d
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 13, 2020
f4e3391
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 22, 2020
100c693
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 28, 2020
8b28ac2
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Aug 23, 2020
6edd125
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Sep 6, 2020
a2cbb4a
Merge remote-tracking branch 'upstream/master'
uditalias Nov 15, 2020
cd77e4a
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 20, 2021
4749df1
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 22, 2021
65d6567
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Feb 9, 2022
f88609d
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Feb 10, 2022
1824b31
Merge remote-tracking branch 'upstream/master'
uditalias May 10, 2022
a8bfc95
Merge branch 'prebid:master' into master
uditalias Jul 20, 2022
a96fcc2
feat(module): VidazooBidAdapter - send top query params to server
uditalias Jul 20, 2022
1619bdd
Merge branch 'prebid:master' into master
saar120 Aug 7, 2022
471b215
Merge branch 'prebid:master' into master
saar120 Aug 15, 2022
90ef4d1
Merge branch 'prebid:master' into master
uditalias Sep 4, 2022
b22ea4d
Merge branch 'prebid:master' into master
saar120 Sep 21, 2022
32f5168
Merge branch 'prebid:master' into master
uditalias Oct 2, 2022
869ffa2
Merge branch 'prebid:master' into master
uditalias Nov 14, 2022
8c37122
Merge branch 'prebid:master' into master
uditalias Nov 27, 2022
c9e3fd3
Merge branch 'prebid:master' into master
uditalias Nov 29, 2022
1a62841
Merge branch 'prebid:master' into master
saar120 Dec 27, 2022
6cd9700
Merge branch 'prebid:master' into master
saar120 Jan 30, 2023
5e9a8d3
Merge branch 'prebid:master' into master
saar120 Feb 1, 2023
ba6d278
Merge branch 'prebid:master' into master
uditalias Feb 5, 2023
87c7bec
Merge branch 'prebid:master' into master
uditalias Feb 6, 2023
8635034
Merge branch 'prebid:master' into master
saar120 Mar 8, 2023
9f2262c
Merge branch 'prebid:master' into master
saar120 Mar 23, 2023
839c21f
Merge branch 'prebid:master' into master
saar120 Apr 2, 2023
201244e
feat: support metaData from server response.
saar120 Apr 2, 2023
df1b899
remove forgotten only on spec.
saar120 Apr 2, 2023
07658d4
Merge branch 'prebid:master' into vidazooBidAdapter_support_metaData
saar120 Apr 10, 2023
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
17 changes: 13 additions & 4 deletions modules/vidazooBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function interpretResponse(serverResponse, request) {

try {
results.forEach(result => {
const {creativeId, ad, price, exp, width, height, currency, advertiserDomains, mediaType = BANNER} = result;
const {creativeId, ad, price, exp, width, height, currency, advertiserDomains, metaData, mediaType = BANNER} = result;
if (!ad || !price) {
return;
}
Expand All @@ -241,11 +241,20 @@ function interpretResponse(serverResponse, request) {
currency: currency || CURRENCY,
netRevenue: true,
ttl: exp || TTL_SECONDS,
meta: {
advertiserDomains: advertiserDomains || []
}
};

if (metaData) {
Object.assign(response, {
meta: metaData
})
} else {
Object.assign(response, {
meta: {
advertiserDomains: advertiserDomains || []
}
})
}

if (mediaType === BANNER) {
Object.assign(response, {
ad: ad,
Expand Down
13 changes: 13 additions & 0 deletions test/spec/modules/vidazooBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,19 @@ describe('VidazooBidAdapter', function () {
});
});

it('should get meta from response metaData', function () {
const serverResponse = utils.deepClone(SERVER_RESPONSE);
serverResponse.body.results[0].metaData = {
advertiserDomains: ['vidazoo.com'],
agencyName: 'Agency Name',
};
const responses = adapter.interpretResponse(serverResponse, REQUEST);
expect(responses[0].meta).to.deep.equal({
advertiserDomains: ['vidazoo.com'],
agencyName: 'Agency Name'
});
});

it('should return an array of interpreted video responses', function () {
const responses = adapter.interpretResponse(VIDEO_SERVER_RESPONSE, REQUEST);
expect(responses).to.have.length(1);
Expand Down