-
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.
Merge remote-tracking branch 'prebid/master'
- Loading branch information
Showing
11 changed files
with
1,331 additions
and
7 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
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' | ||
} | ||
} | ||
} | ||
] | ||
} | ||
]; | ||
``` |
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
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,41 @@ | ||
import { | ||
BANNER, | ||
NATIVE | ||
} from '../src/mediaTypes.js'; | ||
import { | ||
registerBidder | ||
} from '../src/adapters/bidderFactory.js'; | ||
import { | ||
getBannerRequest, | ||
getBannerResponse, | ||
getNativeResponse, | ||
} from '../libraries/audUtils/bidderUtils.js'; | ||
|
||
const ENDPOINT = 'https://rtb-east.tapnative.com/hb'; | ||
// Export const spec | ||
export const spec = { | ||
code: 'tapnative', | ||
supportedMediaTypes: [BANNER, NATIVE], | ||
// Determines whether or not the given bid request is valid | ||
isBidRequestValid: function(bidParam) { | ||
return !!(bidParam.params.placement_id); | ||
}, | ||
// Make a server request from the list of BidRequests | ||
buildRequests: function(bidRequests, serverRequest) { | ||
// Get Requests based on media types | ||
return getBannerRequest(bidRequests, serverRequest, ENDPOINT); | ||
}, | ||
// Unpack the response from the server into a list of bids. | ||
interpretResponse: function(serverResponse, serverRequest) { | ||
let bidderResponse = {}; | ||
const mType = JSON.parse(serverRequest.data)[0].MediaType; | ||
if (mType == BANNER) { | ||
bidderResponse = getBannerResponse(serverResponse, BANNER); | ||
} else if (mType == NATIVE) { | ||
bidderResponse = getNativeResponse(serverResponse, serverRequest, NATIVE); | ||
} | ||
return bidderResponse; | ||
} | ||
} | ||
|
||
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,61 @@ | ||
# Overview | ||
|
||
``` | ||
Module Name: Tapnative Bidder Adapter | ||
Module Type: Bidder Adapter | ||
Maintainer: [email protected] | ||
``` | ||
|
||
# Description | ||
|
||
Tapnative currently supports the BANNER and NATIVE type ads through prebid js | ||
|
||
Module that connects to tapnative's demand sources. | ||
|
||
# Test Request | ||
``` | ||
var adUnits = [ | ||
{ | ||
code: 'display-ad', | ||
mediaTypes: { | ||
banner: { | ||
sizes: [[300, 250]], | ||
} | ||
} | ||
bids: [ | ||
{ | ||
bidder: 'tapnative', | ||
params: { | ||
placement_id: 111520, // Required parameter | ||
width: 300, // Optional parameter | ||
height: 250, // Optional parameter | ||
bid_floor: 0.5 // Optional parameter | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
code: 'native-ad-container', | ||
mediaTypes: { | ||
native: { | ||
title: { required: true, len: 100 }, | ||
image: { required: true, sizes: [300, 250] }, | ||
sponsored: { required: false }, | ||
clickUrl: { required: true }, | ||
desc: { required: true }, | ||
icon: { required: false, sizes: [50, 50] }, | ||
cta: { required: false } | ||
} | ||
}, | ||
bids: [ | ||
{ | ||
bidder: 'tapnative', | ||
params: { | ||
placement_id: 111519, // Required parameter | ||
bid_floor: 1 // Optional parameter | ||
} | ||
} | ||
] | ||
} | ||
]; | ||
``` |
Oops, something went wrong.