Skip to content

Commit

Permalink
relaido Bid Adapter: Add meta OBJ to BidResponse (prebid#6914)
Browse files Browse the repository at this point in the history
* add relaido adapter

* remove event listener

* fixed UserSyncs and e.data

* fix conflicts

* add response meda OBJ

update version and  test code

Co-authored-by: ishigami_shingo <s.ishigami@relaido.co.jp>
Co-authored-by: cmertv-sishigami <s.ishigami@cmertv.com>
Co-authored-by: t_bun <t.bun@cmertv.com>
  • Loading branch information
4 people authored and agrandes-tappx committed Sep 29, 2021
1 parent 668f3fa commit 2489918
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: ['relaido.co.jp', '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 2489918

Please sign in to comment.