Skip to content

Commit

Permalink
Add keywordsparametr (prebid#5227)
Browse files Browse the repository at this point in the history
* initial

* fix

* remove redundant language mod, use player sizes in video traff

* test modify

* fix

* Adding Tests

* add keywords param

* log

* log

* log

* fix

Co-authored-by: Aigolkin1991 <Aigolkin1991@gmail.com>
  • Loading branch information
2 people authored and Jimmy Tu committed Jun 12, 2020
1 parent f7aba49 commit 42af2d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion modules/adprimeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ export const spec = {
sizes = bid.mediaTypes[VIDEO].playerSize
}
}

placements.push({
placementId: bid.params.placementId,
bidId: bid.bidId,
sizes: sizes || [],
wPlayer: sizes ? sizes[0] : 0,
hPlayer: sizes ? sizes[1] : 0,
traffic: bid.params.traffic || BANNER,
schain: bid.schain || {}
schain: bid.schain || {},
keywords: bid.params.keywords || []
});
}
return {
Expand Down
8 changes: 6 additions & 2 deletions modules/adprimeBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Module that connects to adprime demand sources
bidder: 'adprime',
params: {
placementId: 0,
traffic: 'banner'
traffic: 'banner',
keywords: ['cat_1', 'cat_2']
}
}
]
Expand All @@ -44,7 +46,9 @@ Module that connects to adprime demand sources
bidder: 'adprime',
params: {
placementId: 0,
traffic: 'video'
traffic: 'video',
keywords: ['cat_1', 'cat_2']
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/adprimeBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('AdprimebBidAdapter', function () {
expect(data.gdpr).to.not.exist;
expect(data.ccpa).to.not.exist;
let placement = data['placements'][0];
expect(placement).to.have.keys('placementId', 'bidId', 'traffic', 'sizes', 'hPlayer', 'wPlayer', 'schain');
expect(placement).to.have.keys('placementId', 'bidId', 'traffic', 'sizes', 'hPlayer', 'wPlayer', 'schain', 'keywords');
expect(placement.placementId).to.equal(0);
expect(placement.bidId).to.equal('23fhj33i987f');
expect(placement.traffic).to.equal(BANNER);
Expand Down

0 comments on commit 42af2d1

Please sign in to comment.