Closed jaiminpanchal27 closed 6 years ago
One big thing jumps out at me:
S2SDefaultValues
to the Bidders
. Someone might want to be a PBS host without being a Bidder.For example, a bunch of independent Publishers might join together and split the cost of hosting a PBS instance on a neutral domain so that they can benefit from shared usersyncs without giving up control to a particular Bidder.
It's also generally better to have two small interfaces than one big one.
get
is a misleading name here. Something like update
or transform
would be clearer. second @dbemiller's comments.
Discussed this offline with @dbemiller
For 1. we will create a new module s2sVendors
and export S2S_VENDORS
with default values.
Taking inspiration from amp project. https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/0.1/callout-vendors.js
Type of issue
Feature Request
Description
For client side header bidding we have got bidderFactory as base adapter for all the bidders. For server side header bidding we use PrebidServer adapter to create bidRequests and interpret bidResponse. Over the course of adding more features, we had to add some hardcoded usage of bidders to do various tasks. Some of theme are updating bid params, convert type of params, set default values and maybe something else in future.
Proposed Solution
Extend bidder spec to add new functions to remove all hardcoded occurrences. PrebidServer adapter will use this functions if they exist and update the request payload. Both these functions will be optional
1) getS2SDefaultValues() - This function will return s2s default values for particular bidder. For appnexus it will return this https://github.com/prebid/Prebid.js/blob/master/modules/prebidServerBidAdapter.js#L36
2) getS2SBidParams(params) - This function will receive its own bid params and return updated params. In case of appnexus, it needs to convert type of params and convert camel case params to underscore. https://github.com/prebid/Prebid.js/blob/master/modules/prebidServerBidAdapter.js#L474