// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/doubleclickbidmanager.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const doubleclickbidmanager = google.doubleclickbidmanager('v1.1');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/doubleclickbidmanager'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await doubleclickbidmanager.queries.getquery({
// Query ID to retrieve.
queryId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind",
// "metadata": {},
// "params": {},
// "queryId": "my_queryId",
// "reportDataEndTimeMs": "my_reportDataEndTimeMs",
// "reportDataStartTimeMs": "my_reportDataStartTimeMs",
// "schedule": {},
// "timezoneCode": "my_timezoneCode"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
const {google} = require('googleapis');
const doubleclickbidmanager = google.doubleclickbidmanager('v1.1');
const {google} = require('googleapis');
const doubleclickbidmanager = google.doubleclickbidmanager('v1');
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/doubleclickbidmanager.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const doubleclickbidmanager = google.doubleclickbidmanager('v1.1');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/doubleclickbidmanager'],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await doubleclickbidmanager.queries.createquery({
// If true, tries to run the query asynchronously. Only applicable when the frequency is ONE_TIME.
asynchronous: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "kind": "my_kind",
// "metadata": {},
// "params": {},
// "queryId": "my_queryId",
// "reportDataEndTimeMs": "my_reportDataEndTimeMs",
// "reportDataStartTimeMs": "my_reportDataStartTimeMs",
// "schedule": {},
// "timezoneCode": "my_timezoneCode"
// }
},
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind",
// "metadata": {},
// "params": {},
// "queryId": "my_queryId",
// "reportDataEndTimeMs": "my_reportDataEndTimeMs",
// "reportDataStartTimeMs": "my_reportDataStartTimeMs",
// "schedule": {},
// "timezoneCode": "my_timezoneCode"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/displayvideo.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const displayvideo = google.displayvideo('v1dev');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: [
'https://www.googleapis.com/auth/display-video',
'https://www.googleapis.com/auth/doubleclickbidmanager',
],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await displayvideo.sdfdownloadtasks.operations.get({
// The name of the operation resource.
name: 'sdfdownloadtasks/operations/my-operation',
});
console.log(res.data);
// Example response
// {
// "done": false,
// "error": {},
// "metadata": {},
// "name": "my_name",
// "response": {}
// }
}
main().catch(e => {
console.error(e);
throw e;
});