-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding Essens adapter #1353
adding Essens adapter #1353
Conversation
if (bid.bidId && bid.params && bid.params.placementId) { | ||
return true | ||
} else { | ||
utils.logError('bid requires missing essential params for essens') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should register a NO_BID as well
modules/essensBidAdapter.js
Outdated
|
||
function getEssesnBidRequests () { | ||
return $$PREBID_GLOBAL$$ | ||
._bidsRequested.find(bidSet => bidSet.bidderCode === 'essens') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better that you keep tabs on the bid request in the adapter (it's passed to callbids) rather than poking around at private Prebid.js variables which could change.
stubLoadScript.restore() | ||
); | ||
|
||
it('invalid case: missing bid', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of any case where bids would be missing. But there should be cases where bad bids are sent, i.e. bad bid.params. So I'm not sure this is a good test.
|
||
afterEach(() => { | ||
stubAddBidResponse.restore() | ||
pbjs._bidsRequested.pop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be reliant on prebid private vars. When you stub addBidRespone
you can grab the bids. This is important as it can mess with other tests that may be doing this same thing (but shouldn't be). In fact, since you are stubbing addBidResponse
Also should be $$PREBID_GLOBAL$$
instead of pbjs
'id': '1234' | ||
} | ||
|
||
pbjs._bidsRequested.push(bidderRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing. don't use pbjs private vars.
Hey @navneetpandey, can you pull from master and fix the lint errors? There were also some minor changes to the format of adapters in #1422 and #1459. Check out any of the other adapters for an example of how it's done now. |
Hi @dbemiller I made changes and fixed the lint error. The built is failing on other adapter (Rubicon). Let me know if I need to make more changes in our adapter. |
Looks like the CI passed on that last changeset anyway... so I just merged it now. You'll also want to submit a PR to the docs repo to get your bidder added to the bidders params page, which many publishers use. |
I already made PR for the doc repo. See prebid/prebid.github.io#289. Let me know if I need to do something more there. |
aha! ok, cool. Sorry I didn't see that. Our docs guy, @rmloveland, will look it over and let you know there. |
* adding Essens adapter * Resloved issues from pull request submition * Lint, createNew constructor related fix * reverting yarn changes, and fixing missed modification at essensAdapter
* adding Essens adapter * Resloved issues from pull request submition * Lint, createNew constructor related fix * reverting yarn changes, and fixing missed modification at essensAdapter
* adding Essens adapter * Resloved issues from pull request submition * Lint, createNew constructor related fix * reverting yarn changes, and fixing missed modification at essensAdapter
Type of change
Description of change
New Essens bidder
Be sure to test the integration with your adserver using the Hello World sample page.
Navneet Kumar Pandey navneet@essens.no
Other information
prebid/prebid.github.io#289 For documentation.