Skip to content

Commit

Permalink
fix(realtimebidding): update the API
Browse files Browse the repository at this point in the history
#### realtimebidding:v1alpha

The following keys were changed:
- schemas.BiddingFunction.properties.type.enumDescriptions
  • Loading branch information
yoshi-automation authored and sofisl committed May 21, 2021
1 parent 1ec199f commit 1b9c3cd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions discovery/realtimebidding-v1alpha.json
Expand Up @@ -178,7 +178,7 @@
}
}
},
"revision": "20210429",
"revision": "20210519",
"rootUrl": "https://realtimebidding.googleapis.com/",
"schemas": {
"BiddingFunction": {
Expand All @@ -203,7 +203,7 @@
"enumDescriptions": [
"Default value that should not be used.",
"Bidding function that can be used by Authorized Buyers in the original TURTLEDOVE simulation. See The function takes in a Javascript object, `inputs`, that contains the following named fields: `openrtbContextualBidRequest` OR `googleContextualBidRequest`, `customContextualSignal`, `interestBasedBidData`, `interestGroupData`, `recentImpressionAges`, and returns the bid price CPM. Example: ``` /* Returns a bid price CPM. * * @param {Object} inputs an object with the * following named fields: * - openrtbContextualBidRequest * OR googleContextualBidRequest * - customContextualSignal * - interestBasedBidData * - interestGroupData * - recentImpressionAges */ function biddingFunction(inputs) { ... return inputs.interestBasedBidData.cpm * inputs.customContextualSignals.placementMultiplier; } ```",
"Buyer's interest group bidding function that can be used by Authorized Buyers in the FLEDGE simulation. See the FLEDGE explainer at https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding. The function takes one argument, `inputs`, that contains an object with the following named fields of the form: ``` { \"interestGroup\" : [ { \"buyerCreativeId\": \"...\", # Ad creative ID \"adData\": { # any JSON of your choosing }, \"userBiddingSignals\": { . # any JSON of your choosing } } ], \"auctionSignals\": { \"url: # string, \"slotVisibility\": # enum value, \"slotDimensions\": [ { \"height\": # number value \"width\": # number value } ] }, \"perBuyerSignals\": { # Any JSON }, \"trustedBiddingSignals\": { # Any JSON }, \"browserSignals\": { \"recent_impression_ages_secs: [ # number ] } } ``` `interestGroup`: An object containing a list of `ad` objects, which contain the following named fields: - `buyerCreativeId`: The ad creative ID string. - `adData`: Any JSON value of the bidder's choosing to contain data associated with an ad provided in `BidResponse.ad.adslot.ad_data` for the Google Authorized Buyers protocol and `BidResponse.seatbid.bid.ext.ad_data` for the OpenRTB protocol. - `userBiddingSignals`: Any JSON value of the bidder's choosing containing interest group data that corresponds to user_bidding_signals (as in FLEDGE). This field will be populated from `BidResponse.interest_group_map.user_bidding_signals` for Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. `auctionSignals`: Contains data from the seller. It corresponds to the auction signals data described in the FLEDGE proposal. It is an object containing the following named fields: - `url`: The string URL of the page with parameters removed. - `slotVisibility`: Enum of one of the following potential values: - NO_DETECTION = 0 - ABOVE_THE_FOLD = 1 - BELOW_THE_FOLD = 2 - `slotDimensions`: A list of objects containing containing width and height pairs in `width` and `height` fields, respectively, from `BidRequest.adslot.width` and `BidRequest.adslot.height` for the Google Authorized Buyers protocol and `BidRequest.imp.banner.format.w` and `BidRequest.imp.banner.format.h` for the OpenRTB protocol. `perBuyerSignals`: The contextual signals from the bid response that are populated in `BidResponse.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the OpenRTB protocol. These signals can be of any JSON format of your choosing, however, the buyer's domain name must match between: - the interest group response in `BidResponse.interest_group_map.buyer_domain` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_map.buyer_domain` for the OpenRTB protocol. - the contextual response as a key to the map in `BidResponse.interest_group_bidding.interest_group_buyers` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_bidding.interest_group_buyers` for the OpenRTB protocol. In other words, there must be a match between the buyer domain of the contextual per_buyer_signals and the domain of an interest group. `trustedBiddingSignals`: The trusted bidding signals that corresponds to the trusted_bidding_signals in the FLEDGE proposal. It is provided in the interest group response as `BidResponse.interest_group_map.user_bidding_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. This field can be any JSON format of your choosing. `browserSignals`: An object of simulated browser-provider signals. It is an object with a single named field, `recent_impression_ages_secs`, that contains a list of estimated number value recent impression ages in seconds for a given interest group. The function returns the string creative ID of the selected ad, the bid price CPM, and (optionally) selected product IDs. Example: ``` function biddingFunction(inputs) { ... return { \"buyerCreativeId\": \"ad_creative_id_1\", \"bidPriceCpm\": 0.3, \"productIds\": [\"product_id_1\", \"product_id_2\", \"product_id_3\"] } } ```"
"Buyer's interest group bidding function that can be used by Authorized Buyers in the FLEDGE simulation. See the FLEDGE explainer at https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding. The function takes one argument, `inputs`, that contains an object with the following named fields of the form: ``` { \"interestGroup\" : [ { \"buyerCreativeId\": \"...\", # Ad creative ID \"adData\": { # any JSON of your choosing }, \"userBiddingSignals\": { . # any JSON of your choosing } } ], \"auctionSignals\": { \"url: # string, \"slotVisibility\": # enum value, \"slotDimensions\": [ { \"height\": # number value \"width\": # number value } ] }, \"perBuyerSignals\": { # Any JSON }, \"trustedBiddingSignals\": { # Any JSON }, \"browserSignals\": { \"recent_impression_ages_secs: [ # number ] } } ``` `interestGroup`: An object containing a list of `ad` objects, which contain the following named fields: - `buyerCreativeId`: The ad creative ID string. - `adData`: Any JSON value of the bidder's choosing to contain data associated with an ad provided in `BidResponse.ad.adslot.ad_data` for the Google Authorized Buyers protocol and `BidResponse.seatbid.bid.ext.ad_data` for the OpenRTB protocol. - `userBiddingSignals`: Any JSON value of the bidder's choosing containing interest group data that corresponds to user_bidding_signals (as in FLEDGE). This field will be populated from `BidResponse.interest_group_map.user_bidding_signals` for Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. `auctionSignals`: Contains data from the seller. It corresponds to the auction signals data described in the FLEDGE proposal. It is an object containing the following named fields: - `url`: The string URL of the page with parameters removed. - `slotVisibility`: Enum of one of the following potential values: - NO_DETECTION = 0 - ABOVE_THE_FOLD = 1 - BELOW_THE_FOLD = 2 - `slotDimensions`: A list of objects containing containing width and height pairs in `width` and `height` fields, respectively, from `BidRequest.adslot.width` and `BidRequest.adslot.height` for the Google Authorized Buyers protocol and `BidRequest.imp.banner.format.w` and `BidRequest.imp.banner.format.h` for the OpenRTB protocol. `perBuyerSignals`: The contextual signals from the bid response that are populated in `BidResponse.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the OpenRTB protocol. These signals can be of any JSON format of your choosing, however, the buyer's domain name must match between: - the interest group response in `BidResponse.interest_group_map.buyer_domain` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_map.buyer_domain` for the OpenRTB protocol. - the contextual response as a key to the map in `BidResponse.interest_group_bidding.interest_group_buyers` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_bidding.interest_group_buyers` for the OpenRTB protocol. In other words, there must be a match between the buyer domain of the contextual per_buyer_signals and the domain of an interest group. `trustedBiddingSignals`: The trusted bidding signals that corresponds to the trusted_bidding_signals in the FLEDGE proposal. It is provided in the interest group response as `BidResponse.interest_group_map.user_bidding_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. This field can be any JSON format of your choosing. `browserSignals`: An object of simulated browser-provider signals. It is an object with a single named field, `recent_impression_ages_secs`, that contains a list of estimated number value recent impression ages in seconds for a given interest group. The function returns the string creative ID of the selected ad, the bid price CPM, and (optionally) selected product IDs. In addition, the bidding function may populate an optional string debug token that may be useful for remote debugging of a bidding function performing unexpectedly. This debug string is available in `BidResponseFeedback` (https://developers.google.com/authorized-buyers/rtb/realtime-bidding-guide#bidresponsefeedback-object) and BidFeedback (https://developers.google.com/authorized-buyers/rtb/openrtb-guide#bidfeedback), for the Google protocol and openRTB protocol respectively. Example: ``` function biddingFunction(inputs) { ... return { \"buyerCreativeId\": \"ad_creative_id_1\", \"bidPriceCpm\": 0.3, \"productIds\": [\"product_id_1\", \"product_id_2\", \"product_id_3\"] \"debugString\": \"Bidding function executed successfully!\" } } ```"
],
"type": "string"
}
Expand Down
53 changes: 27 additions & 26 deletions src/apis/realtimebidding/v1.ts
Expand Up @@ -2370,7 +2370,8 @@ export namespace realtimebidding_v1 {

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Bidders$Pretargetingconfigs$Addtargetedapps;
params =
{} as Params$Resource$Bidders$Pretargetingconfigs$Addtargetedapps;
options = {};
}

Expand Down Expand Up @@ -2432,8 +2433,8 @@ export namespace realtimebidding_v1 {
* google.options({auth: authClient});
*
* // Do the magic
* const res = await realtimebidding.bidders.pretargetingConfigs.addTargetedPublishers(
* {
* const res =
* await realtimebidding.bidders.pretargetingConfigs.addTargetedPublishers({
* // Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId\}/pretargetingConfig/{configId\}
* pretargetingConfig:
* 'bidders/my-bidder/pretargetingConfigs/my-pretargetingConfig',
Expand All @@ -2446,8 +2447,7 @@ export namespace realtimebidding_v1 {
* // "targetingMode": "my_targetingMode"
* // }
* },
* }
* );
* });
* console.log(res.data);
*
* // Example response
Expand Down Expand Up @@ -2538,7 +2538,8 @@ export namespace realtimebidding_v1 {

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Bidders$Pretargetingconfigs$Addtargetedpublishers;
params =
{} as Params$Resource$Bidders$Pretargetingconfigs$Addtargetedpublishers;
options = {};
}

Expand Down Expand Up @@ -2600,8 +2601,8 @@ export namespace realtimebidding_v1 {
* google.options({auth: authClient});
*
* // Do the magic
* const res = await realtimebidding.bidders.pretargetingConfigs.addTargetedSites(
* {
* const res =
* await realtimebidding.bidders.pretargetingConfigs.addTargetedSites({
* // Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId\}/pretargetingConfig/{configId\}
* pretargetingConfig:
* 'bidders/my-bidder/pretargetingConfigs/my-pretargetingConfig',
Expand All @@ -2614,8 +2615,7 @@ export namespace realtimebidding_v1 {
* // "targetingMode": "my_targetingMode"
* // }
* },
* }
* );
* });
* console.log(res.data);
*
* // Example response
Expand Down Expand Up @@ -2706,7 +2706,8 @@ export namespace realtimebidding_v1 {

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Bidders$Pretargetingconfigs$Addtargetedsites;
params =
{} as Params$Resource$Bidders$Pretargetingconfigs$Addtargetedsites;
options = {};
}

Expand Down Expand Up @@ -3558,8 +3559,8 @@ export namespace realtimebidding_v1 {
* google.options({auth: authClient});
*
* // Do the magic
* const res = await realtimebidding.bidders.pretargetingConfigs.removeTargetedApps(
* {
* const res =
* await realtimebidding.bidders.pretargetingConfigs.removeTargetedApps({
* // Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId\}/pretargetingConfig/{configId\}
* pretargetingConfig:
* 'bidders/my-bidder/pretargetingConfigs/my-pretargetingConfig',
Expand All @@ -3571,8 +3572,7 @@ export namespace realtimebidding_v1 {
* // "appIds": []
* // }
* },
* }
* );
* });
* console.log(res.data);
*
* // Example response
Expand Down Expand Up @@ -3663,7 +3663,8 @@ export namespace realtimebidding_v1 {

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Bidders$Pretargetingconfigs$Removetargetedapps;
params =
{} as Params$Resource$Bidders$Pretargetingconfigs$Removetargetedapps;
options = {};
}

Expand Down Expand Up @@ -3725,8 +3726,8 @@ export namespace realtimebidding_v1 {
* google.options({auth: authClient});
*
* // Do the magic
* const res = await realtimebidding.bidders.pretargetingConfigs.removeTargetedPublishers(
* {
* const res =
* await realtimebidding.bidders.pretargetingConfigs.removeTargetedPublishers({
* // Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId\}/pretargetingConfig/{configId\}
* pretargetingConfig:
* 'bidders/my-bidder/pretargetingConfigs/my-pretargetingConfig',
Expand All @@ -3738,8 +3739,7 @@ export namespace realtimebidding_v1 {
* // "publisherIds": []
* // }
* },
* }
* );
* });
* console.log(res.data);
*
* // Example response
Expand Down Expand Up @@ -3830,7 +3830,8 @@ export namespace realtimebidding_v1 {

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Bidders$Pretargetingconfigs$Removetargetedpublishers;
params =
{} as Params$Resource$Bidders$Pretargetingconfigs$Removetargetedpublishers;
options = {};
}

Expand Down Expand Up @@ -3892,8 +3893,8 @@ export namespace realtimebidding_v1 {
* google.options({auth: authClient});
*
* // Do the magic
* const res = await realtimebidding.bidders.pretargetingConfigs.removeTargetedSites(
* {
* const res =
* await realtimebidding.bidders.pretargetingConfigs.removeTargetedSites({
* // Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId\}/pretargetingConfig/{configId\}
* pretargetingConfig:
* 'bidders/my-bidder/pretargetingConfigs/my-pretargetingConfig',
Expand All @@ -3905,8 +3906,7 @@ export namespace realtimebidding_v1 {
* // "sites": []
* // }
* },
* }
* );
* });
* console.log(res.data);
*
* // Example response
Expand Down Expand Up @@ -3997,7 +3997,8 @@ export namespace realtimebidding_v1 {

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Bidders$Pretargetingconfigs$Removetargetedsites;
params =
{} as Params$Resource$Bidders$Pretargetingconfigs$Removetargetedsites;
options = {};
}

Expand Down

0 comments on commit 1b9c3cd

Please sign in to comment.