Conversation
|
Docs PR prebid/prebid.github.io#1461 |
|
@TinchoF Can you please put together some unit tests for this new adapter? The following link can provide some direction if needed (or feel free to look at the unit test files for other adapters as a reference): |
jsnellbaker
left a comment
There was a problem hiding this comment.
Hi @TinchoF
Thanks for putting together the unit tests. I ran an initial test of the adapter using test values in the .md file.
Based on that attempt, there are a few items in the code here that should be reviewed again.
Can you please take a look and make the requested changes? If you have any questions, please let me know and I'll be happy to help.
Thanks!
-Jason
modules/outconAdapter.md
Outdated
| { | ||
| pod: "5beeb24a306ea47660632043", | ||
| internalId: "12345678", | ||
| publisher: "5beeb1fd306ea4779e464532" |
There was a problem hiding this comment.
Can you please update this example text to follow a proper adUnit? For example:
var adUnits = [{
code: 'test-adUnit',
mediaTypes: { banner: { sizes: [[300, 250], [300, 600]] } },
bids: [{
bidder: 'outcon',
params: {
pod: '5beeb24a306ea47660632043',
internalId: '12345678',
publisher: '5beeb1fd306ea4779e464532'
}
}]
}];
There was a problem hiding this comment.
Regarding the ad unit format, our clients show programmatic advertising in PODs (points of display) that we have in our database, upon receiving the POD id or the publisher ID + Internal ID, we access all the data to deliver the ad appropriately (resolution, size, mimes, audience, etc.)
modules/outconBidAdapter.js
Outdated
| @@ -0,0 +1,41 @@ | |||
| import {registerBidder} from '../src/adapters/bidderFactory'; | |||
| import {config} from '../src/config'; | |||
| const BIDDER_CODE = 'outcom'; | |||
There was a problem hiding this comment.
The value here is outcom while the adapter name is outcon. The primary name of the bidder should match the name of the file(s) used in Prebid.
Can you please update this value (if that's where the typo is)?
modules/outconBidAdapter.js
Outdated
| const BIDDER_CODE = 'outcom'; | ||
| export const spec = { | ||
| code: BIDDER_CODE, | ||
| aliases: ['outcom'], |
There was a problem hiding this comment.
If you have the same name as the value for your BIDDER_CODE, this alias property doesn't need to be defined. This should only be used when you have a different name.
modules/outconBidAdapter.js
Outdated
|
|
||
| buildRequests: function(validBidRequests) { | ||
| let par = ''; | ||
| if (validBidRequests.params.pod != undefined) par = 'get?pod=' + validBidRequests.params.pod; |
There was a problem hiding this comment.
The validBidRequests is an array of potential bid requests to your adapter (in case the publisher has you listed in multiple adUnit objects on their page).
Can you please update the internal logic in this function to access the array? It's currently throwing undefined errors.
Type of change
Description of change
Be sure to test the integration with your adserver using the Hello World sample page.
For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:
Other information