TypeScript typings for Ad Exchange Buyer API II v2beta1
Accesses the latest features for managing Authorized Buyers accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.
For detailed description please check documentation.
Installing
Install typings for Ad Exchange Buyer API II:
npm install @types/gapi.client.adexchangebuyer2-v2beta1 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
});
Then load api client wrapper:
gapi.client.load(
'https://adexchangebuyer.googleapis.com/$discovery/rest?version=v2beta1',
() => {
},
);
gapi.client.load('adexchangebuyer2', 'v2beta1', () => {
});
Don't forget to authenticate your client before sending any request to resources:
var client_id = '',
scope = [
'https://www.googleapis.com/auth/adexchange.buyer',
],
immediate = true;
gapi.auth.authorize(
{client_id: client_id, scope: scope, immediate: immediate},
authResult => {
if (authResult && !authResult.error) {
} else {
}
},
);
After that you can use Ad Exchange Buyer API II resources:
For provenance information see Provenance section on NPM