-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add excoBidAdapter and corresponding tests (#12317)
Introduce the excoBidAdapter for handling bid requests and responses, including support for banner and video media types. Implement unit tests to validate the functionality and ensure proper integration with the prebid framework.
- Loading branch information
Showing
3 changed files
with
727 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Overview | ||
|
||
**Module Name:** Exco Bid Adapter | ||
|
||
**Module Type:** Bidder Adapter | ||
|
||
**Maintainer:** [email protected] | ||
|
||
# Description | ||
|
||
Module that connects to Exco's demand sources. | ||
|
||
# Test Parameters | ||
```js | ||
var adUnits = [ | ||
{ | ||
code: 'test-ad', | ||
sizes: [[300, 250]], | ||
bids: [ | ||
{ | ||
bidder: 'exco', | ||
params: { | ||
cId: '562524b21b1c1f08117fc7f9', | ||
pId: '59ac17c192832d0011283fe3', | ||
bidFloor: 0.0001, | ||
ext: { | ||
param1: 'loremipsum', | ||
param2: 'dolorsitamet' | ||
} | ||
} | ||
} | ||
] | ||
} | ||
]; | ||
``` |
Oops, something went wrong.