Skip to content

Commit

Permalink
Add support for aliases (prebid#5342)
Browse files Browse the repository at this point in the history
* Support new aniview bid adapter

* Support new aniview bid adapter

* Support new aniview bid adapter

* Support new aniview bid adapter

* Fix Consent parameters

* Update aniviewBidAdapter.js

V3 support

* Update aniviewBidAdapter.js

* Update aniviewBidAdapter.js

Update refererInfo

* Update aniviewBidAdapter.js

Fix tabs and spaces

* Update aniviewBidAdapter.js

fixes

* Update aniviewBidAdapter.js

* Update aniviewBidAdapter.js

Add ccpa support

* Update aniviewBidAdapter.js

Typo

* Update aniviewBidAdapter.js

* Update aniviewBidAdapter.js

* Fix size and sample

Fixed sizes from playerSize
Updated md sample

* Fix tabs

* Fix sizes

* Recheck

* Add tgt parameter

* Update sample

* Add support for cookie sync + tests

* Add support for cookie sync + tests

* Add support for cookie sync + tests

* Support aliases

Support aliases

* Update

Update

* Fix lint

Fix lint

* Update spec

Update spec
  • Loading branch information
itaynave authored and iggyfisk committed Jun 22, 2020
1 parent 4a9c98b commit 8958053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions modules/aniviewBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ function avRenderer(bid) {
}

function newRenderer(bidRequest) {
let playerDomain = bidRequest && bidRequest.bidRequest && bidRequest.bidRequest.params && bidRequest.bidRequest.params.playerDomain ? bidRequest.bidRequest.params.playerDomain : 'player.aniview.com';
const renderer = Renderer.install({
url: 'https://player.aniview.com/script/6.1/prebidRenderer.js',
url: 'https://' + playerDomain + '/script/6.1/prebidRenderer.js',
config: {},
loaded: false,
});
Expand Down Expand Up @@ -167,7 +168,6 @@ function interpretResponse(serverResponse, bidRequest) {
let cpmData = getCpmData(xml);
if (cpmData && cpmData.cpm > 0) {
bidResponse.requestId = bidRequest.data.bidId;
bidResponse.bidderCode = BIDDER_CODE;
bidResponse.ad = '';
bidResponse.cpm = cpmData.cpm;
bidResponse.width = bidRequest.data.AV_WIDTH;
Expand Down Expand Up @@ -252,6 +252,7 @@ function getUserSyncs(syncOptions, serverResponses) {

export const spec = {
code: BIDDER_CODE,
aliases: ['selectmediavideo'],
supportedMediaTypes: [VIDEO],
isBidRequestValid,
buildRequests,
Expand Down
2 changes: 0 additions & 2 deletions test/spec/modules/aniviewBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ describe('ANIVIEW Bid Adapter Test', function () {
});

describe('buildRequests', function () {
const ENDPOINT = 'https://v.lkqd.net/ad';
let bid2Requests = [
{
'bidder': 'aniview',
Expand Down Expand Up @@ -156,7 +155,6 @@ describe('ANIVIEW Bid Adapter Test', function () {
expect(bidResponses.length).to.equal(1);
let bidResponse = bidResponses[0];
expect(bidResponse.requestId).to.equal(bidRequest.data.bidId);
expect(bidResponse.bidderCode).to.equal(BIDDER_CODE);
expect(bidResponse.cpm).to.equal('2');
expect(bidResponse.ttl).to.equal(600);
expect(bidResponse.currency).to.equal('USD');
Expand Down

0 comments on commit 8958053

Please sign in to comment.