forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdexertoBidAdapter.js
31 lines (29 loc) · 886 Bytes
/
dexertoBidAdapter.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
import {
BANNER
} from '../src/mediaTypes.js';
import {
registerBidder
} from '../src/adapters/bidderFactory.js';
import {
getBannerRequest,
getBannerResponse,
} from '../libraries/audUtils/bidderUtils.js';
const ENDPOINT_URL = 'https://rtb.dexerto.media/hb/dexerto';
// Export const spec
export const spec = {
code: 'dexerto',
supportedMediaTypes: BANNER,
// Determines whether or not the given bid request is valid
isBidRequestValid: (bid) => {
return !!(bid.params.placement_id);
},
// Make a server request from the list of BidRequests
buildRequests: (bidRequests, bidderRequest) => {
return getBannerRequest(bidRequests, bidderRequest, ENDPOINT_URL);
},
// Unpack the response from the server into a list of bids.
interpretResponse: (bidResponse, bidRequest) => {
return getBannerResponse(bidResponse, BANNER);
}
}
registerBidder(spec);