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

adformOpenRTB Bid Adapter: change name to adf to avoid collision #6642

Merged
merged 1 commit into from
Apr 23, 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import {
import * as utils from '../src/utils.js';
import { config } from '../src/config.js';

const BIDDER_CODE = 'adformOpenRTB';
const BIDDER_CODE = 'adf';
const GVLID = 50;
const BIDDER_ALIAS = [ { code: 'adformOpenRTB', gvlid: GVLID } ];
const NATIVE_ASSET_IDS = { 0: 'title', 2: 'icon', 3: 'image', 5: 'sponsoredBy', 4: 'body', 1: 'cta' };
const NATIVE_PARAMS = {
title: {
Expand Down Expand Up @@ -47,6 +48,7 @@ const NATIVE_PARAMS = {

export const spec = {
code: BIDDER_CODE,
aliases: BIDDER_ALIAS,
gvlid: GVLID,
supportedMediaTypes: [ NATIVE ],
isBidRequestValid: bid => !!bid.params.mid,
Expand Down Expand Up @@ -170,7 +172,6 @@ export const spec = {
netRevenue: bid.netRevenue === 'net',
currency: cur,
mediaType: NATIVE,
bidderCode: BIDDER_CODE,
native: parseNative(bidResponse)
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Overview

Module Name: Adform OpenRTB Adapter
Module Name: Adf Adapter
Module Type: Bidder Adapter
Maintainer: [email protected]

# Description

Module that connects to Adform demand sources to fetch bids.
Only native format is supported. Using OpenRTB standard.
Only native format is supported. Using OpenRTB standard. Previous adapter name - adformOpenRTB.

# Test Parameters
```
Expand Down Expand Up @@ -42,7 +42,7 @@ Only native format is supported. Using OpenRTB standard.
}
},
bids: [{
bidder: 'adformOpenRTB',
bidder: 'adf',
params: {
mid: 606169, // required
adxDomain: 'adx.adform.net', // optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
// jshint esversion: 6, es3: false, node: true
import {assert, expect} from 'chai';
import {spec} from 'modules/adformOpenRTBBidAdapter.js';
import {spec} from 'modules/adfBidAdapter.js';
import { NATIVE } from 'src/mediaTypes.js';
import { config } from 'src/config.js';
import { createEidsArray } from 'modules/userId/eids.js';

describe('AdformOpenRTB adapter', function () {
describe('Adf adapter', function () {
let serverResponse, bidRequest, bidResponses;
let bids = [];

describe('backwards-compatibility', function () {
it('should have adformOpenRTB alias defined', function () {
assert.equal(spec.aliases[0].code, 'adformOpenRTB');
assert.equal(spec.aliases[0].gvlid, 50);
});
});

describe('isBidRequestValid', function () {
let bid = {
'bidder': 'adformOpenRTB',
Expand Down Expand Up @@ -567,7 +574,6 @@ describe('AdformOpenRTB adapter', function () {
assert.deepEqual(bids[0].netRevenue, false);
assert.deepEqual(bids[0].currency, serverResponse.body.cur);
assert.deepEqual(bids[0].mediaType, 'native');
assert.deepEqual(bids[0].bidderCode, 'adformOpenRTB');
});
it('should set correct native params', function () {
const bid = [
Expand Down