Skip to content

Commit 8c600ba

Browse files
ecammitTimothy M. AcepratikC-IMDS
authored
Prebid 8: IMDS bid adapter - Rename synacormedia adapter (#9381)
* CAPT-252: Synacormedia bid adapter: add tmax to requests based upon provided timeouts. * Re-brand synacormedia adapter to imds (iMedia Digitial Services) * Add alias to synacormedia for backwards compatibility --------- Co-authored-by: Timothy M. Ace <[email protected]> Co-authored-by: Pratik Chavan <[email protected]>
1 parent 2eea263 commit 8c600ba

File tree

3 files changed

+31
-28
lines changed

3 files changed

+31
-28
lines changed

modules/synacormediaBidAdapter.js renamed to modules/imdsBidAdapter.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ const BLOCKED_AD_SIZES = [
1616
];
1717
const DEFAULT_MAX_TTL = 420; // 7 minutes
1818
export const spec = {
19-
code: 'synacormedia',
19+
code: 'imds',
20+
aliases: [
21+
{ code: 'synacormedia' }
22+
],
2023
supportedMediaTypes: [ BANNER, VIDEO ],
2124
sizeMap: {},
2225

@@ -63,15 +66,15 @@ export const spec = {
6366

6467
validBidReqs.forEach((bid, i) => {
6568
if (seatId && seatId !== bid.params.seatId) {
66-
logWarn(`Synacormedia: there is an inconsistent seatId: ${bid.params.seatId} but only sending bid requests for ${seatId}, you should double check your configuration`);
69+
logWarn(`IMDS: there is an inconsistent seatId: ${bid.params.seatId} but only sending bid requests for ${seatId}, you should double check your configuration`);
6770
return;
6871
} else {
6972
seatId = bid.params.seatId;
7073
}
7174
const tagIdOrPlacementId = bid.params.tagId || bid.params.placementId;
7275
let pos = parseInt(bid.params.pos || deepAccess(bid.mediaTypes, 'video.pos'), 10);
7376
if (isNaN(pos)) {
74-
logWarn(`Synacormedia: there is an invalid POS: ${bid.params.pos}`);
77+
logWarn(`IMDS: there is an invalid POS: ${bid.params.pos}`);
7578
pos = 0;
7679
}
7780
const videoOrBannerKey = this.isVideoBid(bid) ? 'video' : 'banner';
@@ -149,7 +152,7 @@ export const spec = {
149152
};
150153
const bidFloor = getBidFloor(bid, 'banner', '*');
151154
if (isNaN(bidFloor)) {
152-
logWarn(`Synacormedia: there is an invalid bid floor: ${bid.params.bidfloor}`);
155+
logWarn(`IMDS: there is an invalid bid floor: ${bid.params.bidfloor}`);
153156
}
154157
if (bidFloor !== null && !isNaN(bidFloor)) {
155158
imp.bidfloor = bidFloor;
@@ -173,7 +176,7 @@ export const spec = {
173176
};
174177
const bidFloor = getBidFloor(bid, 'video', size);
175178
if (isNaN(bidFloor)) {
176-
logWarn(`Synacormedia: there is an invalid bid floor: ${bid.params.bidfloor}`);
179+
logWarn(`IMDS: there is an invalid bid floor: ${bid.params.bidfloor}`);
177180
}
178181

179182
if (bidFloor !== null && !isNaN(bidFloor)) {
@@ -211,7 +214,7 @@ export const spec = {
211214
};
212215

213216
if (!serverResponse.body || typeof serverResponse.body != 'object') {
214-
logWarn('Synacormedia: server returned empty/non-json response: ' + JSON.stringify(serverResponse.body));
217+
logWarn('IMDS: server returned empty/non-json response: ' + JSON.stringify(serverResponse.body));
215218
return;
216219
}
217220
const {id, seatbid: seatbids} = serverResponse.body;
@@ -299,7 +302,7 @@ export const spec = {
299302
url: `${USER_SYNC_HOST}/html/usersync.html?src=$$REPO_AND_VERSION$$`
300303
});
301304
} else {
302-
logWarn('Synacormedia: Please enable iframe based user sync.');
305+
logWarn('IMDS: Please enable iframe based user sync.');
303306
}
304307
return syncs;
305308
}

modules/synacormediaBidAdapter.md renamed to modules/imdsBidAdapter.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Overview
22

33
```
4-
Module Name: Synacor Media Bidder Adapter
4+
Module Name: iMedia Digital Services Bidder Adapter
55
Module Type: Bidder Adapter
6-
Maintainer: eng-demand@synacor.com
6+
Maintainer: eng-demand@imds.tv
77
```
88

99
# Description
1010

11-
The Synacor Media adapter requires setup and approval from Synacor.
11+
The iMedia Digital Services adapter requires setup and approval from iMedia Digital Services.
1212
Please reach out to your account manager for more information.
1313

1414
### DFP Video Creative
@@ -30,7 +30,7 @@ https://track.technoratimedia.com/openrtb/tags?ID=%%PATTERN:hb_cache_id_synacorm
3030
}
3131
},
3232
bids: [{
33-
bidder: "synacormedia",
33+
bidder: "imds",
3434
params: {
3535
seatId: "prebid",
3636
tagId: "demo1",
@@ -49,7 +49,7 @@ https://track.technoratimedia.com/openrtb/tags?ID=%%PATTERN:hb_cache_id_synacorm
4949
}
5050
},
5151
bids: [{
52-
bidder: "synacormedia",
52+
bidder: "imds",
5353
params: {
5454
seatId: "prebid",
5555
tagId: "demo1",

test/spec/modules/synacormediaBidAdapter_spec.js renamed to test/spec/modules/imdsBidAdapter_spec.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { assert, expect } from 'chai';
22
import { BANNER } from 'src/mediaTypes.js';
33
import { config } from 'src/config.js';
4-
import { spec } from 'modules/synacormediaBidAdapter.js';
4+
import { spec } from 'modules/imdsBidAdapter.js';
55

6-
describe('synacormediaBidAdapter ', function () {
6+
describe('imdsBidAdapter ', function () {
77
describe('isBidRequestValid', function () {
88
let bid;
99
beforeEach(function () {
@@ -115,7 +115,7 @@ describe('synacormediaBidAdapter ', function () {
115115
});
116116
describe('buildRequests', function () {
117117
let validBidRequestVideo = {
118-
bidder: 'synacormedia',
118+
bidder: 'imds',
119119
params: {
120120
seatId: 'prebid',
121121
tagId: '1234',
@@ -140,7 +140,7 @@ describe('synacormediaBidAdapter ', function () {
140140
};
141141

142142
let bidderRequestVideo = {
143-
bidderCode: 'synacormedia',
143+
bidderCode: 'imds',
144144
auctionId: 'VideoAuctionId124',
145145
bidderRequestId: '117954d20d7c9c',
146146
auctionStart: 1553624929697,
@@ -543,7 +543,7 @@ describe('synacormediaBidAdapter ', function () {
543543
});
544544
it('should use all the video params in the impression request', function () {
545545
let validBidRequestVideo = {
546-
bidder: 'synacormedia',
546+
bidder: 'imds',
547547
params: {
548548
seatId: 'prebid',
549549
tagId: '1234',
@@ -601,7 +601,7 @@ describe('synacormediaBidAdapter ', function () {
601601
});
602602
it('should move any video params in the mediaTypes object to params.video object', function () {
603603
let validBidRequestVideo = {
604-
bidder: 'synacormedia',
604+
bidder: 'imds',
605605
params: {
606606
seatId: 'prebid',
607607
tagId: '1234',
@@ -659,7 +659,7 @@ describe('synacormediaBidAdapter ', function () {
659659
});
660660
it('should create params.video object if not present on bid request and move any video params in the mediaTypes object to it', function () {
661661
let validBidRequestVideo = {
662-
bidder: 'synacormedia',
662+
bidder: 'imds',
663663
params: {
664664
seatId: 'prebid',
665665
tagId: '1234'
@@ -731,7 +731,7 @@ describe('synacormediaBidAdapter ', function () {
731731

732732
describe('Bid Requests with placementId should be backward compatible ', function () {
733733
let validVideoBidReq = {
734-
bidder: 'synacormedia',
734+
bidder: 'imds',
735735
params: {
736736
seatId: 'prebid',
737737
placementId: 'demo1',
@@ -772,7 +772,7 @@ describe('synacormediaBidAdapter ', function () {
772772
refererInfo: {
773773
referer: 'http://localhost:9999/'
774774
},
775-
bidderCode: 'synacormedia',
775+
bidderCode: 'imds',
776776
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110'
777777
};
778778

@@ -793,7 +793,7 @@ describe('synacormediaBidAdapter ', function () {
793793

794794
describe('Bid Requests with schain object ', function () {
795795
let validBidReq = {
796-
bidder: 'synacormedia',
796+
bidder: 'imds',
797797
params: {
798798
seatId: 'prebid',
799799
tagId: 'demo1',
@@ -835,12 +835,12 @@ describe('synacormediaBidAdapter ', function () {
835835
refererInfo: {
836836
referer: 'http://localhost:9999/'
837837
},
838-
bidderCode: 'synacormedia',
838+
bidderCode: 'imds',
839839
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110',
840840
bidderRequestId: '16d438671bfbec',
841841
bids: [
842842
{
843-
bidder: 'synacormedia',
843+
bidder: 'imds',
844844
params: {
845845
seatId: 'prebid',
846846
tagId: 'demo1',
@@ -1313,7 +1313,7 @@ describe('synacormediaBidAdapter ', function () {
13131313

13141314
describe('Bid Requests with price module should use if available', function () {
13151315
let validVideoBidRequest = {
1316-
bidder: 'synacormedia',
1316+
bidder: 'imds',
13171317
params: {
13181318
bidfloor: '0.50',
13191319
seatId: 'prebid',
@@ -1356,7 +1356,7 @@ describe('synacormediaBidAdapter ', function () {
13561356
refererInfo: {
13571357
referer: 'http://localhost:9999/'
13581358
},
1359-
bidderCode: 'synacormedia',
1359+
bidderCode: 'imds',
13601360
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110'
13611361
};
13621362

@@ -1383,7 +1383,7 @@ describe('synacormediaBidAdapter ', function () {
13831383

13841384
describe('Bid Requests with gpid or anything in bid.ext should use if available', function () {
13851385
let validVideoBidRequest = {
1386-
bidder: 'synacormedia',
1386+
bidder: 'imds',
13871387
params: {
13881388
seatId: 'prebid',
13891389
placementId: 'demo1',
@@ -1440,7 +1440,7 @@ describe('synacormediaBidAdapter ', function () {
14401440
refererInfo: {
14411441
referer: 'http://localhost:9999/'
14421442
},
1443-
bidderCode: 'synacormedia',
1443+
bidderCode: 'imds',
14441444
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110'
14451445
};
14461446

0 commit comments

Comments
 (0)