Skip to content

Commit

Permalink
Adf Bid Adapter: rename adformOpenRTB adapter; add former name as ali…
Browse files Browse the repository at this point in the history
…as (#6642)
  • Loading branch information
braizhas authored and idettman committed May 21, 2021
1 parent 0c92fee commit 0923c13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
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

0 comments on commit 0923c13

Please sign in to comment.