From 8c5c9d52ef996d90958b41b02808677e0ff7f4bb Mon Sep 17 00:00:00 2001 From: Giuseppe Cera <117671343+giuseppe-exads@users.noreply.github.com> Date: Wed, 8 May 2024 17:10:03 +0100 Subject: [PATCH] EXADS Bid Adapter : update bidder code before adapter is published (#11464) * First commit * fix: readme.md * fix: changed exads urls * fix: Tools and suggestions related to the doc * fix: from code review * fix: from code review * fix: from code review * fix: error from code review - native example * fox: from code review * fix: from code review * fix: from code review * fix: native img set as mandatory * fix: from code review * fix: from code review * fix: from code review * fix: from code review * fix: from code review * fix: from code review * fix: bidfloor and bidfloorcur set as optional * fix: dsa * fix: mananing multiple responses * fix: unit test after code review * fix: fixing native snippet code * fix: from code review * fix: video events after code review * fix: video module into documentation * fix: impression tracker for native * fix: afeter code review * fix: unit tests * fix: added badv and bcat * fix: video -> mimes and protocols * fix * fix: removed image_output and video_output params, forcing always html for rtb banner * fix: gulp * fix: added site.name * fix: removed EXADS dir * fix: after linting * fix: unit tests * fix: final dsa solution * fix: dsa * fix: fix instream example * fix: doc media type context * fix: documented the endpoint param into native section * fix: related to markdown lint validation (#2) * fix: from CR (#3) * fix: changed bidder code to exads * fix: userAgent --------- Co-authored-by: tfoliveira --- modules/exadsBidAdapter.js | 9 ++++----- modules/exadsBidAdapter.md | 8 ++++---- test/spec/modules/exadsBidAdapter_spec.js | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/exadsBidAdapter.js b/modules/exadsBidAdapter.js index 20ead7a7e6b..e50c141f4b0 100644 --- a/modules/exadsBidAdapter.js +++ b/modules/exadsBidAdapter.js @@ -2,7 +2,7 @@ import * as utils from '../src/utils.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -const BIDDER = 'exadsadserver'; +const BIDDER = 'exads'; const PARTNERS = { ORTB_2_4: 'ortb_2_4' @@ -332,12 +332,11 @@ function getEnvParams() { envParams.osName = 'MacOS'; } else if (envParams.userAgent.match(/Unix/i)) { envParams.osName = 'Unix'; - // TODO: what is userAgent.userAgent supposed to be? - } else if (envParams.userAgent.userAgent?.match(/Android/i)) { + } else if (envParams.userAgent.match(/Android/i)) { envParams.osName = 'Android'; - } else if (envParams.userAgent.userAgent?.match(/iPhone|iPad|iPod/i)) { + } else if (envParams.userAgent.match(/iPhone|iPad|iPod/i)) { envParams.osName = 'iOS'; - } else if (envParams.userAgent.userAgent?.match(/Linux/i)) { + } else if (envParams.userAgent.match(/Linux/i)) { envParams.osName = 'Linux'; } else { envParams.osName = 'Unknown'; diff --git a/modules/exadsBidAdapter.md b/modules/exadsBidAdapter.md index 06b873d8da8..4c8eedffdd0 100644 --- a/modules/exadsBidAdapter.md +++ b/modules/exadsBidAdapter.md @@ -123,7 +123,7 @@ adUnits = } }, bids: [{ - bidder: 'exadsadserver', + bidder: 'exads', params: { zoneId: 12345, fid: '829a896f011475d50da0d82cfdd1af8d9cdb07ff', @@ -162,7 +162,7 @@ adUnits = } }, bids: [{ - bidder: 'exadsadserver', + bidder: 'exads', params: { zoneId: 12345, fid: '829a896f011475d50da0d82cfdd1af8d9cdb07ff', @@ -237,7 +237,7 @@ adUnits = [{ } }, bids: [{ - bidder: 'exadsadserver', + bidder: 'exads', params: { zoneId: 12345, fid: '829a896f011475d50da0d82cfdd1af8d9cdb07ff', @@ -365,7 +365,7 @@ adUnits = [{ } }, bids: [{ - bidder: 'exadsadserver', + bidder: 'exads', params: { zoneId: 12345, fid: '829a896f011475d50da0d82cfdd1af8d9cdb07ff', diff --git a/test/spec/modules/exadsBidAdapter_spec.js b/test/spec/modules/exadsBidAdapter_spec.js index 9253f21ddf1..ca24dad3959 100644 --- a/test/spec/modules/exadsBidAdapter_spec.js +++ b/test/spec/modules/exadsBidAdapter_spec.js @@ -3,7 +3,7 @@ import { spec, imps } from 'modules/exadsBidAdapter.js'; import { BANNER, NATIVE, VIDEO } from '../../../src/mediaTypes.js'; describe('exadsBidAdapterTest', function () { - const bidder = 'exadsadserver'; + const bidder = 'exads'; const partners = { ORTB_2_4: 'ortb_2_4'