forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexcoBidAdapter.js
37 lines (30 loc) · 1.17 KB
/
excoBidAdapter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {getStorageManager} from '../src/storageManager.js';
import {
isBidRequestValid, createUserSyncGetter, createInterpretResponseFn, createBuildRequestsFn
} from '../libraries/vidazooUtils/bidderUtils.js';
const DEFAULT_SUB_DOMAIN = 'rtb';
const BIDDER_CODE = 'exco';
const BIDDER_VERSION = '1.0.0';
const GVLID = 444;
export const storage = getStorageManager({bidderCode: BIDDER_CODE});
export function createDomain(subDomain = DEFAULT_SUB_DOMAIN) {
return `https://${subDomain}.exco-pb.com`;
}
const buildRequests = createBuildRequestsFn(createDomain, null, storage, BIDDER_CODE, BIDDER_VERSION, false);
const interpretResponse = createInterpretResponseFn(BIDDER_CODE, false);
const getUserSyncs = createUserSyncGetter({
iframeSyncUrl: 'https://cs.exco-pb.com/api/sync/iframe', imageSyncUrl: 'https://cs.exco-pb.com/api/sync/image'
});
export const spec = {
code: BIDDER_CODE,
version: BIDDER_VERSION,
supportedMediaTypes: [BANNER, VIDEO],
gvlid: GVLID,
isBidRequestValid,
buildRequests,
interpretResponse,
getUserSyncs
};
registerBidder(spec);