Skip to content

Commit

Permalink
add response meda OBJ
Browse files Browse the repository at this point in the history
update version and  test code
  • Loading branch information
t_bun committed Jun 2, 2021
1 parent 0572f86 commit 227e338
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion modules/relaidoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getStorageManager } from '../src/storageManager.js';

const BIDDER_CODE = 'relaido';
const BIDDER_DOMAIN = 'api.relaido.jp';
const ADAPTER_VERSION = '1.0.3';
const ADAPTER_VERSION = '1.0.4';
const DEFAULT_TTL = 300;
const UUID_KEY = 'relaido_uuid';

Expand Down Expand Up @@ -112,6 +112,10 @@ function interpretResponse(serverResponse, bidRequest) {
ttl: body.ttl || DEFAULT_TTL,
netRevenue: true,
mediaType: mediaType,
meta: {
advertiserDomains: body.adomain || [],
mediaType: VIDEO
}
};
if (mediaType === VIDEO) {
bidResponse.vastXml = body.vast;
Expand Down
6 changes: 5 additions & 1 deletion test/spec/modules/relaidoBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { expect } from 'chai';
import { spec } from 'modules/relaidoBidAdapter.js';
import * as utils from 'src/utils.js';
import { BANNER, VIDEO } from 'src/mediaTypes.js';
import { getStorageManager } from '../../../src/storageManager.js';

const UUID_KEY = 'relaido_uuid';
Expand Down Expand Up @@ -59,7 +60,8 @@ describe('RelaidoAdapter', function () {
uuid: relaido_uuid,
vast: '<VAST version="3.0"><Ad><InLine></InLine></Ad></VAST>',
playerUrl: 'https://relaido/player.js',
syncUrl: 'https://relaido/sync.html'
syncUrl: 'https://relaido/sync.html',
adomain: ['https://relaido.co.jp', 'https://www.cmertv.co.jp']
}
};
serverRequest = {
Expand Down Expand Up @@ -276,6 +278,8 @@ describe('RelaidoAdapter', function () {
expect(response.currency).to.equal(serverResponse.body.currency);
expect(response.creativeId).to.equal(serverResponse.body.creativeId);
expect(response.vastXml).to.equal(serverResponse.body.vast);
expect(response.meta.advertiserDomains).to.equal(serverResponse.body.adomain);
expect(response.meta.mediaType).to.equal(VIDEO);
expect(response.ad).to.be.undefined;
});

Expand Down

0 comments on commit 227e338

Please sign in to comment.