Skip to content
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

Adnuntius Bid Adater: URL changes #7154

Merged
merged 15 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions modules/adnuntiusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { config } from '../src/config.js';
import { getStorageManager } from '../src/storageManager.js';

const BIDDER_CODE = 'adnuntius';
const ENDPOINT_URL = 'https://delivery.adnuntius.com/i?tzo=';
const ENDPOINT_URL = 'https://ads.adnuntius.delivery/i';
const GVLID = 855;

const checkSegment = function (segment) {
Expand Down Expand Up @@ -33,7 +33,6 @@ const handleMeta = function () {
adnMeta = JSON.parse(storage.getDataFromLocalStorage('adn.metaData'))
}
const meta = (adnMeta !== null) ? adnMeta.reduce((acc, cur) => { return { ...acc, [cur.key]: cur.value } }, {}) : {}
utils.logMessage('STORE', adnMeta, meta)
return meta
}

Expand Down Expand Up @@ -62,6 +61,8 @@ export const spec = {
const tzo = new Date().getTimezoneOffset();
const gdprApplies = utils.deepAccess(bidderRequest, 'gdprConsent.gdprApplies');
const consentString = utils.deepAccess(bidderRequest, 'gdprConsent.consentString');

request.push('tzo=' + tzo)
request.push('format=json')
if (gdprApplies !== undefined) request.push('consentString=' + consentString);
if (segments.length > 0) request.push('segments=' + segments.join(','));
Expand All @@ -87,7 +88,7 @@ export const spec = {
const network = networkKeys[j];
requests.push({
method: 'POST',
url: ENDPOINT_URL + tzo + '&' + request.join('&'),
url: ENDPOINT_URL + '?' + request.join('&'),
data: JSON.stringify(networks[network]),
bid: bidRequests[network]
});
Expand Down
3 changes: 1 addition & 2 deletions test/spec/modules/adnuntiusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as utils from 'src/utils.js';
import { getStorageManager } from 'src/storageManager.js';

describe('adnuntiusBidAdapter', function () {
const URL = 'https://delivery.adnuntius.com/i?tzo=';
const URL = 'https://ads.adnuntius.delivery/i?tzo=';
const GVLID = 855;
const usi = utils.generateUUID()
const meta = [{ key: 'usi', value: usi }]
Expand All @@ -19,7 +19,6 @@ describe('adnuntiusBidAdapter', function () {
});
const tzo = new Date().getTimezoneOffset();
const ENDPOINT_URL = `${URL}${tzo}&format=json&userId=${usi}`;
// const ENDPOINT_URL_SEGMENTS_ = `${URL}${tzo}&format=json`;
const ENDPOINT_URL_SEGMENTS = `${URL}${tzo}&format=json&segments=segment1,segment2,segment3&userId=${usi}`;
const ENDPOINT_URL_CONSENT = `${URL}${tzo}&format=json&consentString=consentString&userId=${usi}`;
const adapter = newBidder(spec);
Expand Down