Skip to content

Commit

Permalink
AdMatic Bid Adapter: badv added (prebid#9820)
Browse files Browse the repository at this point in the history
* Admatic Bidder Adaptor

* Update admaticBidAdapter.md

* Update admaticBidAdapter.md

* remove floor parameter

* Update admaticBidAdapter.js

* Admatic Bid Adapter: alias and bid floor features activated

* Admatic adapter: host param control changed

* Alias name changed.

* Revert "Admatic adapter: host param control changed"

This reverts commit de7ac85.

* added alias feature and host param

* Revert "added alias feature and host param"

This reverts commit 6ec8f45.

* Revert "Alias name changed."

This reverts commit 661c54f.

* Revert "Admatic Bid Adapter: alias and bid floor features activated"

This reverts commit 7a2e0e2.

* Revert "Update admaticBidAdapter.js"

This reverts commit 7a845b7.

* Revert "remove floor parameter"

This reverts commit 7a23b05.

* Admatic adapter: host param control && Add new Bidder

* Revert "Admatic adapter: host param control && Add new Bidder"

This reverts commit 3c797b1.

* commit new features

* Update admaticBidAdapter.js

* updated for coverage

* sync updated

* Update adloader.js

* AdMatic Bidder: development of user sync url

* Update admaticBidAdapter.js

* Set currency for AdserverCurrency: bug fix

* Update admaticBidAdapter.js

* update
  • Loading branch information
fatihkaya84 authored and jorgeluisrocha committed May 18, 2023
1 parent 0c13904 commit 4a10eb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions modules/admaticBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getValue, logError, deepAccess, getBidIdParameter, isArray } from '../src/utils.js';
import { getValue, logError, isEmpty, deepAccess, getBidIdParameter, isArray } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
Expand Down Expand Up @@ -34,6 +34,7 @@ export const spec = {
*/
buildRequests: (validBidRequests, bidderRequest) => {
const bids = validBidRequests.map(buildRequestObject);
const blacklist = bidderRequest.ortb2 || {};
const networkId = getValue(validBidRequests[0].params, 'networkId');
const host = getValue(validBidRequests[0].params, 'host');
const currency = config.getConfig('currency.adServerCurrency') || 'TRY';
Expand All @@ -59,6 +60,10 @@ export const spec = {
}
};

if (!isEmpty(blacklist.badv)) {
payload.blacklist = blacklist.badv;
};

if (payload) {
switch (bidderName) {
case 'pixad':
Expand All @@ -69,7 +74,7 @@ export const spec = {
break;
}

return { method: 'POST', url: `https://${host}/pb?bidder=${bidderName}`, data: payload, options: { contentType: 'application/json' } };
return { method: 'POST', url: `https://${host}/pb`, data: payload, options: { contentType: 'application/json' } };
}
},

Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/admaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {spec, storage} from 'modules/admaticBidAdapter.js';
import {newBidder} from 'src/adapters/bidderFactory.js';
import {getStorageManager} from 'src/storageManager';

const ENDPOINT = 'https://layer.serve.admatic.com.tr/pb?bidder=admatic';
const ENDPOINT = 'https://layer.serve.admatic.com.tr/pb';

describe('admaticBidAdapter', () => {
const adapter = newBidder(spec);
Expand Down

0 comments on commit 4a10eb5

Please sign in to comment.