-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add JSDoc for pbjs.getAllWinningBids
#1566
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -647,6 +647,45 @@ $$PREBID_GLOBAL$$.enableSendAllBids = function () { | |
config.setConfig({ enableSendAllBids: true }); | ||
}; | ||
|
||
/** | ||
* The bid response object returned by an external bidder adapter during the auction. | ||
* @typedef {Object} AdapterBidResponse | ||
* @property {string} pbAg Auto granularity price bucket; CPM <= 5 ? increment = 0.05 : CPM > 5 && CPM <= 10 ? increment = 0.10 : CPM > 10 && CPM <= 20 ? increment = 0.50 : CPM > 20 ? priceCap = 20.00. Example: `"0.80"`. | ||
* @property {string} pbCg Custom price bucket. For example setup, see {@link setPriceGranularity}. Example: `"0.84"`. | ||
* @property {string} pbDg Dense granularity price bucket; CPM <= 3 ? increment = 0.01 : CPM > 3 && CPM <= 8 ? increment = 0.05 : CPM > 8 && CPM <= 20 ? increment = 0.50 : CPM > 20? priceCap = 20.00. Example: `"0.84"`. | ||
* @property {string} pbLg Low granularity price bucket; $0.50 increment, capped at $5, floored to two decimal places. Example: `"0.50"`. | ||
* @property {string} pbMg Medium granularity price bucket; $0.10 increment, capped at $20, floored to two decimal places. Example: `"0.80"`. | ||
* @property {string} pbHg High granularity price bucket; $0.01 increment, capped at $20, floored to two decimal places. Example: `"0.84"`. | ||
* | ||
* @property {string} bidder The string name of the bidder. This *may* be the same as the `bidderCode`. For For a list of all bidders and their codes, see [Bidders' Params](http://prebid.org/dev-docs/bidders.html). | ||
* @property {string} bidderCode The unique string that identifies this bidder. For a list of all bidders and their codes, see [Bidders' Params](http://prebid.org/dev-docs/bidders.html). | ||
* | ||
* @property {string} requestId The [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) representing the bid request. | ||
* @property {number} requestTimestamp The time at which the bid request was sent out, expressed in milliseconds. | ||
* @property {number} responseTimestamp The time at which the bid response was received, expressed in milliseconds. | ||
* @property {number} timeToRespond How long it took for the bidder to respond with this bid, expressed in milliseconds. | ||
* | ||
* @property {string} size The size of the ad creative, expressed in `"AxB"` format, where A and B are numbers of pixels. Example: `"320x50"`. | ||
* @property {string} width The width of the ad creative in pixels. Example: `"320"`. | ||
* @property {string} height The height of the ad creative in pixels. Example: `"50"`. | ||
* | ||
* @property {string} ad The actual ad creative content, often HTML with CSS, JavaScript, and/or links to additional content. Example: `"<div id='beacon_-YQbipJtdxmMCgEPHExLhmqzEm' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://aplus-...'/></div><iframe src=\"http://aax-us-east.amazon-adsystem.com/e/is/8dcfcd..." width=\"728\" height=\"90\" frameborder=\"0\" ...></iframe>",`. | ||
* @property {number} ad_id The ad ID of the creative, as understood by the bidder's system. Used by the line item's [creative in the ad server](http://prebid.org/adops/send-all-bids-adops.html#step-3-add-a-creative). | ||
* @property {string} adUnitCode The code used to uniquely identify the ad unit on the publisher's page. | ||
* | ||
* @property {string} statusMessage The status of the bid. Allowed values: `"Bid available"` or `"Bid returned empty or error response"`. | ||
* @property {number} cpm The exact bid price from the bidder, expressed to the thousandths place. Example: `"0.849"`. | ||
* | ||
* @property {Object} adserverTargeting An object whose values represent the ad server's targeting on the bid. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your call, but... this might be worth a typedef of its own. There are a few There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree but I think it might be better to do this in another PR for the sake of expediency. |
||
* @property {string} adserverTargeting.hb_adid The ad ID of the creative, as understood by the ad server. | ||
* @property {string} adserverTargeting.hb_pb The price paid to show the creative, as logged in the ad server. | ||
* @property {string} adserverTargeting.hb_bidder The winning bidder whose ad creative will be served by the ad server. | ||
*/ | ||
|
||
/** | ||
* Get all of the bids that have won their respective auctions. Useful for [troubleshooting your integration](http://prebid.org/dev-docs/prebid-troubleshooting-guide.html). | ||
* @return {Array<AdapterBidResponse>} A list of bids that have won their respective auctions. | ||
*/ | ||
$$PREBID_GLOBAL$$.getAllWinningBids = function () { | ||
return $$PREBID_GLOBAL$$._winningBids; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these really strings, and not numbers? yuck!