Skip to content

Commit

Permalink
[Orbidder-Adapter] Add bidRequestCount and remove bid.params.keyValues (
Browse files Browse the repository at this point in the history
prebid#4264)

* initial orbidder version in personal github repo

* use adUnits from orbidder_example.html

* replace obsolete functions

* forgot to commit the test

* check if bidderRequest object is available

* try to fix weird safari/ie issue

* ebayK: add more params

* update orbidderBidAdapter.md

* use spec.<function> instead of this.<function> for consistency reasons

* add bidfloor parameter to params object

* fix gdpr object handling

* default to consentRequired: false when not explicitly given

* wip - use onSetTargeting callback

* add tests for onSetTargeting callback

* fix params and respective tests

* remove not used bid.params.keyValues

* add bidRequestCount to orbidder.otto.de/bid Post request

* add bidRequestCount to test object defaultBidRequest
  • Loading branch information
Hendrik Iseke authored and robertrmartinez committed Oct 15, 2019
1 parent 46bfb02 commit e4d3ff5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion modules/orbidderBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const spec = {
(bid.params.accountId && (typeof bid.params.accountId === 'string')) &&
(bid.params.placementId && (typeof bid.params.placementId === 'string')) &&
((typeof bid.params.bidfloor === 'undefined') || (typeof bid.params.bidfloor === 'number')) &&
((typeof bid.params.keyValues === 'undefined') || (typeof bid.params.keyValues === 'object')) &&
((typeof bid.params.profile === 'undefined') || (typeof bid.params.profile === 'object')));
},

Expand All @@ -38,6 +37,7 @@ export const spec = {
auctionId: bidRequest.auctionId,
transactionId: bidRequest.transactionId,
adUnitCode: bidRequest.adUnitCode,
bidRequestCount: bidRequest.bidRequestCount,
sizes: bidRequest.sizes,
params: bidRequest.params
}
Expand Down
13 changes: 1 addition & 12 deletions test/spec/modules/orbidderBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('orbidderBidAdapter', () => {
bidId: 'd66fa86787e0b0ca900a96eacfd5f0bb',
auctionId: 'ccc4c7cdfe11cfbd74065e6dd28413d8',
transactionId: 'd58851660c0c4461e4aa06344fc9c0c6',
bidRequestCount: 1,
adUnitCode: 'adunit-code',
sizes: [[300, 250], [300, 600]],
params: {
Expand Down Expand Up @@ -46,12 +47,6 @@ describe('orbidderBidAdapter', () => {
expect(spec.isBidRequestValid(defaultBidRequest)).to.equal(true);
});

it('accepts optional keyValues object', () => {
const bidRequest = deepClone(defaultBidRequest);
bidRequest.params.keyValues = {'key': 'value'};
expect(spec.isBidRequestValid(bidRequest)).to.equal(true);
});

it('accepts optional profile object', () => {
const bidRequest = deepClone(defaultBidRequest);
bidRequest.params.profile = {'key': 'value'};
Expand All @@ -64,12 +59,6 @@ describe('orbidderBidAdapter', () => {
expect(spec.isBidRequestValid(bidRequest)).to.equal(false);
});

it('doesn\'t accept malformed keyValues', () => {
const bidRequest = deepClone(defaultBidRequest);
bidRequest.params.keyValues = 'another not usable string';
expect(spec.isBidRequestValid(bidRequest)).to.equal(false);
});

it('doesn\'t accept malformed profile', () => {
const bidRequest = deepClone(defaultBidRequest);
bidRequest.params.profile = 'another not usable string';
Expand Down

0 comments on commit e4d3ff5

Please sign in to comment.