// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.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 content = google.content('v2.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/content'],
});
// 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 content.settlementreports.get({
// The Merchant Center account of the settlement report.
merchantId: 'placeholder-value',
// The Google-provided ID of the settlement.
settlementId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "endDate": "my_endDate",
// "kind": "my_kind",
// "previousBalance": {},
// "settlementId": "my_settlementId",
// "startDate": "my_startDate",
// "transferAmount": {},
// "transferDate": "my_transferDate",
// "transferIds": []
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.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 content = google.content('v2.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/content'],
});
// 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 content.freelistingsprogram.get({
// Required. The ID of the account.
merchantId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "regionStatuses": [],
// "state": "my_state"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.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 content = google.content('v2.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/content'],
});
// 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 content.returnaddress.get({
// The Merchant Center account to get a return address for.
merchantId: 'placeholder-value',
// Return address ID generated by Google.
returnAddressId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "address": {},
// "country": "my_country",
// "kind": "my_kind",
// "label": "my_label",
// "phoneNumber": "my_phoneNumber",
// "returnAddressId": "my_returnAddressId"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.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 content = google.content('v2.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/content'],
});
// 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 content.shoppingadsprogram.get({
// Required. The ID of the account.
merchantId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "regionStatuses": [],
// "state": "my_state"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/content.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 content = google.content('v2.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/content'],
});
// 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 content.pubsubnotificationsettings.get({
// The ID of the account for which to get pubsub notification settings.
merchantId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "cloudTopicName": "my_cloudTopicName",
// "kind": "my_kind",
// "registeredEvents": []
// }
}
main().catch(e => {
console.error(e);
throw e;
});