Skip to content

Commit

Permalink
fix(realtimebidding): update the API
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and sofisl committed Mar 10, 2021
1 parent 28da59f commit 0a62f96
Show file tree
Hide file tree
Showing 3 changed files with 725 additions and 2 deletions.
222 changes: 222 additions & 0 deletions discovery/realtimebidding-v1alpha.json
@@ -0,0 +1,222 @@
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/realtime-bidding": {
"description": "See, create, edit, and delete your Authorized Buyers and Open Bidding account entities"
}
}
}
},
"basePath": "",
"baseUrl": "https://realtimebidding.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Real-time Bidding",
"description": "Allows external bidders to manage their RTB integration with Google. This includes managing bidder endpoints, QPS quotas, configuring what ad inventory to receive via pretargeting, submitting creatives for verification, and accessing creative metadata such as approval status.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "realtimebidding:v1alpha",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://realtimebidding.mtls.googleapis.com/",
"name": "realtimebidding",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"bidders": {
"resources": {
"biddingFunctions": {
"methods": {
"create": {
"description": "Creates a new bidding function.",
"flatPath": "v1alpha/bidders/{biddersId}/biddingFunctions",
"httpMethod": "POST",
"id": "realtimebidding.bidders.biddingFunctions.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The name of the bidder for which to create the bidding function. Format: `bidders/{bidderAccountId}`",
"location": "path",
"pattern": "^bidders/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+parent}/biddingFunctions",
"request": {
"$ref": "BiddingFunction"
},
"response": {
"$ref": "BiddingFunction"
},
"scopes": [
"https://www.googleapis.com/auth/realtime-bidding"
]
},
"list": {
"description": "Lists the bidding functions that a bidder currently has registered.",
"flatPath": "v1alpha/bidders/{biddersId}/biddingFunctions",
"httpMethod": "GET",
"id": "realtimebidding.bidders.biddingFunctions.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "The maximum number of bidding functions to return.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results the server should return. This value is received from a previous `ListBiddingFunctions` call in ListBiddingFunctionsResponse.nextPageToken.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. Name of the bidder whose bidding functions will be listed. Format: `bidders/{bidder_account_id}`",
"location": "path",
"pattern": "^bidders/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+parent}/biddingFunctions",
"response": {
"$ref": "ListBiddingFunctionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/realtime-bidding"
]
}
}
}
}
}
},
"revision": "20210308",
"rootUrl": "https://realtimebidding.googleapis.com/",
"schemas": {
"BiddingFunction": {
"description": "The bidding function to be executed as part of the TURTLEDOVE simulation experiment bidding flow.",
"id": "BiddingFunction",
"properties": {
"biddingFunction": {
"description": "The raw Javascript source code of the bidding function. 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 (double). Example: ``` /* Returns a bid price CPM (double). * * @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; } ```",
"type": "string"
},
"name": {
"description": "The name of the bidding function that must follow the pattern: `bidders/{bidder_account_id}/biddingFunctions/{bidding_function_name}`.",
"type": "string"
}
},
"type": "object"
},
"ListBiddingFunctionsResponse": {
"description": "A response containing a list of a bidder's bidding functions.",
"id": "ListBiddingFunctionsResponse",
"properties": {
"biddingFunctions": {
"description": "A list of a bidder's bidding functions.",
"items": {
"$ref": "BiddingFunction"
},
"type": "array"
},
"nextPageToken": {
"description": "A token which can be passed to a subsequent call to the `ListBiddingFunctions` method to retrieve the next page of results in ListBiddingFunctionsRequest.pageToken.",
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "",
"title": "Real-time Bidding API",
"version": "v1alpha",
"version_module": true
}
21 changes: 19 additions & 2 deletions src/apis/realtimebidding/index.ts
Expand Up @@ -15,9 +15,11 @@

import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common';
import {realtimebidding_v1} from './v1';
import {realtimebidding_v1alpha} from './v1alpha';

export const VERSIONS = {
v1: realtimebidding_v1.Realtimebidding,
v1alpha: realtimebidding_v1alpha.Realtimebidding,
};

export function realtimebidding(
Expand All @@ -26,16 +28,31 @@ export function realtimebidding(
export function realtimebidding(
options: realtimebidding_v1.Options
): realtimebidding_v1.Realtimebidding;
export function realtimebidding<T = realtimebidding_v1.Realtimebidding>(
export function realtimebidding(
version: 'v1alpha'
): realtimebidding_v1alpha.Realtimebidding;
export function realtimebidding(
options: realtimebidding_v1alpha.Options
): realtimebidding_v1alpha.Realtimebidding;
export function realtimebidding<
T =
| realtimebidding_v1.Realtimebidding
| realtimebidding_v1alpha.Realtimebidding
>(
this: GoogleConfigurable,
versionOrOptions: 'v1' | realtimebidding_v1.Options
versionOrOptions:
| 'v1'
| realtimebidding_v1.Options
| 'v1alpha'
| realtimebidding_v1alpha.Options
) {
return getAPI<T>('realtimebidding', versionOrOptions, VERSIONS, this);
}

const auth = new AuthPlus();
export {auth};
export {realtimebidding_v1};
export {realtimebidding_v1alpha};
export {
AuthPlus,
GlobalOptions,
Expand Down

0 comments on commit 0a62f96

Please sign in to comment.