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

Pubwise 481 #11

Merged
merged 28 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e9721c8
updates for first cut at bidder
GLStephen Nov 12, 2020
0277aca
fix up height and width
GLStephen Nov 13, 2020
9161810
adds test spec
GLStephen Nov 15, 2020
a2f4946
remove hello_world from commit'
GLStephen Nov 15, 2020
7700d9b
updates to support native and fix issues found in initial review
GLStephen Nov 22, 2020
39e2228
fix handling of new node in response for native vs banner
GLStephen Nov 23, 2020
860b1cc
updates to handle OpenRTB base
GLStephen Nov 25, 2020
3a1607e
updates to support RTB style calls
GLStephen Nov 25, 2020
2b9de0d
updates to get back to parity
GLStephen Nov 25, 2020
fde493a
updates to testing
GLStephen Nov 25, 2020
d49be62
updates to test media type handling
GLStephen Nov 25, 2020
ba548b7
:Merge branch 'external-pw-481' of github.com:PubWise/Prebid.js into …
GLStephen Nov 25, 2020
28d4b7c
updates to handling testing
GLStephen Nov 25, 2020
62c3007
updates to testing
GLStephen Nov 28, 2020
c10b9a7
remove report file
GLStephen Nov 28, 2020
25f9df4
updates to fix up unit/spec tests
GLStephen Nov 28, 2020
6cbd498
updates to fix up unit/spec tests
GLStephen Nov 28, 2020
bd8c7a7
updates to fix up unit/spec tests
GLStephen Nov 28, 2020
c0396fe
updates to handling of gdpr
GLStephen Nov 28, 2020
bec22f1
Delete hello_world.html
GLStephen Nov 28, 2020
2c8c3c6
remove hellow-world-sample
GLStephen Nov 28, 2020
7484100
remove hellow-world-sample
GLStephen Nov 28, 2020
48889f7
updates to fix param tes
GLStephen Nov 29, 2020
6b835f3
fix merge
GLStephen Nov 29, 2020
48167c1
remove unused variables and params
GLStephen Nov 30, 2020
31964df
Merge branch 'external-pw-481' of github.com:PubWise/Prebid.js into p…
GLStephen Nov 30, 2020
f82e764
updates to fix up used and unsused params
GLStephen Nov 30, 2020
ee2ca10
updates to remove usersync and add gvlid
GLStephen Dec 3, 2020
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
27 changes: 3 additions & 24 deletions modules/pubwiseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { config } from '../src/config.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE } from '../src/mediaTypes.js';
const VERSION = '0.1.0';
const GVLID = 842;
const NET_REVENUE = true;
const UNDEFINED = undefined;
const DEFAULT_CURRENCY = 'USD';
Expand All @@ -11,7 +12,7 @@ const BIDDER_CODE = 'pubwise';
const ENDPOINT_URL = 'https://bid.pubwise.io/prebid';
const DEFAULT_WIDTH = 0;
const DEFAULT_HEIGHT = 0;
const PREBID_NATIVE_HELP_LINK = 'http://prebid.org/dev-docs/show-native-ads.html';
const PREBID_NATIVE_HELP_LINK = 'https://prebid.org/dev-docs/show-native-ads.html';
// const USERSYNC_URL = '//127.0.0.1:8080/usersync'

const CUSTOM_PARAMS = {
Expand Down Expand Up @@ -86,6 +87,7 @@ utils._each(NATIVE_ASSETS, anAsset => { NATIVE_ASSET_KEY_TO_ASSET_MAP[anAsset.KE

export const spec = {
code: BIDDER_CODE,
gvlid: GVLID,
supportedMediaTypes: [BANNER, NATIVE],
/**
* Determines whether or not the given bid request is valid.
Expand Down Expand Up @@ -284,21 +286,7 @@ export const spec = {
// _logError(error);
// }
return bidResponses;
},

/**
* Register the user sync pixels which should be dropped after the auction.
*
* @param {SyncOptions} syncOptions Which user syncs are allowed?
* @param {ServerResponse[]} serverResponses List of server's responses.
* @return {UserSync[]} The user syncs which should be dropped.
*/
getUserSyncs: function (syncOptions, serverResponses, gdprConsent, uspConsent) {
const syncs = []

return syncs;
}

}

function _checkMediaType(adm, newBid) {
Expand Down Expand Up @@ -503,19 +491,10 @@ function _parseSlotParam(paramName, paramValue) {
function _parseAdSlot(bid) {
_logInfo('parseAdSlot bid', bid)
bid.params.adUnit = '';
bid.params.adUnitIndex = '0';
bid.params.width = 0;
bid.params.height = 0;
bid.params.adSlot = _cleanSlotName(bid.params.adSlot);

var slot = bid.params.adSlot;
var splits = slot.split(':');

slot = splits[0];
if (splits.length == 2) {
bid.params.adUnitIndex = splits[1];
}

if (bid.hasOwnProperty('mediaTypes')) {
if (bid.mediaTypes.hasOwnProperty(BANNER) &&
bid.mediaTypes.banner.hasOwnProperty('sizes')) { // if its a banner, has mediaTypes and sizes
Expand Down
5 changes: 2 additions & 3 deletions test/spec/modules/pubwiseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,14 @@ const sampleBidderBannerRequest = {
'siteId': 'xxxxxx',
'height': 250,
'width': 300,
'adUnitIndex': '0',
'adUnit': '',
'adSlot': '',
'gender': 'M',
'yob': '2000',
'lat': '33.91989876432274',
'lon': '-84.38897708175764',
'bidFloor': '1.00',
'currency': 'USD',
'adSlot': '',
'adUnit': '',
'bcat': [
'IAB25-3',
'IAB26-1',
Expand Down