// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/factchecktools.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 factchecktools = google.factchecktools('v1alpha1');
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/userinfo.email'],
});
// 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 factchecktools.pages.delete({
// The name of the resource to delete, in the form of `pages/{page_id\}`.
name: 'pages/my-page',
});
console.log(res.data);
// Example response
// {}
}
main().catch(e => {
console.error(e);
throw e;
});
const {google} = require('googleapis');
const factchecktools = google.factchecktools('v1alpha1');
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/analytics.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 analytics = google.analytics('v3');
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/analytics.edit'],
});
// 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 analytics.management.unsampledReports.delete({
// Account ID to delete the unsampled report for.
accountId: 'placeholder-value',
// View (Profile) ID to delete the unsampled report for.
profileId: 'placeholder-value',
// ID of the unsampled report to be deleted.
unsampledReportId: 'placeholder-value',
// Web property ID to delete the unsampled reports for.
webPropertyId: 'placeholder-value',
});
console.log(res.data);
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/dialogflow.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 dialogflow = google.dialogflow('v3beta1');
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/cloud-platform',
'https://www.googleapis.com/auth/dialogflow',
],
});
// 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 dialogflow.projects.locations.agents.webhooks.delete({
// This field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups: * If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the webhook, as well as any references to the webhook (i.e. Webhook and tagin fulfillments that point to this webhook will be removed).
force: 'placeholder-value',
// Required. The name of the webhook to delete. Format: `projects//locations//agents//webhooks/`.
name: 'projects/my-project/locations/my-location/agents/my-agent/webhooks/my-webhook',
});
console.log(res.data);
// Example response
// {}
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/analytics.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 analytics = google.analytics('v3');
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/analytics.edit'],
});
// 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 analytics.management.profiles.delete({
// Account ID to delete the view (profile) for.
accountId: 'placeholder-value',
// ID of the view (profile) to be deleted.
profileId: 'placeholder-value',
// Web property ID to delete the view (profile) for.
webPropertyId: 'placeholder-value',
});
console.log(res.data);
}
main().catch(e => {
console.error(e);
throw e;
});