Skip to content

Commit

Permalink
Add excoBidAdapter and corresponding tests (#12317)
Browse files Browse the repository at this point in the history
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
saar120 authored Oct 11, 2024
1 parent afa7c9b commit 176660f
Show file tree
Hide file tree
Showing 3 changed files with 727 additions and 0 deletions.
37 changes: 37 additions & 0 deletions modules/excoBidAdapter.js
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);
35 changes: 35 additions & 0 deletions modules/excoBidAdapter.md
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'
}
}
}
]
}
];
```
Loading

0 comments on commit 176660f

Please sign in to comment.