// 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');
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.liasettings.list({
// The maximum number of LIA settings to return in the response, used for paging.
maxResults: 'placeholder-value',
// The ID of the managing account. This must be a multi-client account.
merchantId: 'placeholder-value',
// The token returned by the previous request.
pageToken: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind",
// "nextPageToken": "my_nextPageToken",
// "resources": []
// }
}
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');
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.liasettings.requestinventoryverification({
// The ID of the account that manages the order. This cannot be a multi-client account.
accountId: 'placeholder-value',
// The country for which inventory validation is requested.
country: 'placeholder-value',
// The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
merchantId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind"
// }
}
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');
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.liasettings.update({
// The ID of the account for which to get or update LIA settings.
accountId: 'placeholder-value',
// Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
dryRun: 'placeholder-value',
// The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
merchantId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "accountId": "my_accountId",
// "countrySettings": [],
// "kind": "my_kind"
// }
},
});
console.log(res.data);
// Example response
// {
// "accountId": "my_accountId",
// "countrySettings": [],
// "kind": "my_kind"
// }
}
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.liasettings.custombatch({
// Request body metadata
requestBody: {
// request body parameters
// {
// "entries": []
// }
},
});
console.log(res.data);
// Example response
// {
// "entries": [],
// "kind": "my_kind"
// }
}
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.liasettings.setinventoryverificationcontact({
// The ID of the account that manages the order. This cannot be a multi-client account.
accountId: 'placeholder-value',
// The email of the inventory verification contact.
contactEmail: 'placeholder-value',
// The name of the inventory verification contact.
contactName: 'placeholder-value',
// The country for which inventory verification is requested.
country: 'placeholder-value',
// The language for which inventory verification is requested.
language: 'placeholder-value',
// The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
merchantId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind"
// }
}
main().catch(e => {
console.error(e);
throw e;
});