0.0.20240926 • Published 9 months ago
@maxim_mazurok/gapi.client.dfareporting-v3.5 v0.0.20240926
TypeScript typings for Campaign Manager 360 API v3.5
Build applications to efficiently manage large or complex trafficking, reporting, and attribution workflows for Campaign Manager 360. For detailed description please check documentation.
Installing
Install typings for Campaign Manager 360 API:
npm install @types/gapi.client.dfareporting-v3.5 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
// now we can use gapi.client
// ...
});
Then load api client wrapper:
gapi.client.load(
'https://dfareporting.googleapis.com/$discovery/rest?version=v3.5',
() => {
// now we can use:
// gapi.client.dfareporting
}
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('dfareporting', 'v3.5', () => {
// now we can use:
// gapi.client.dfareporting
});
Don't forget to authenticate your client before sending any request to resources:
// declare client_id registered in Google Developers Console
var client_id = '',
scope = [
// View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns
'https://www.googleapis.com/auth/dfatrafficking',
],
immediate = true;
// ...
gapi.auth.authorize(
{client_id: client_id, scope: scope, immediate: immediate},
authResult => {
if (authResult && !authResult.error) {
/* handle successful authorization */
} else {
/* handle authorization error */
}
}
);
After that you can use Campaign Manager 360 API resources:
/*
Inserts a new creative asset.
*/
await gapi.client.dfareporting.media.upload({
advertiserId: 'advertiserId',
profileId: 'profileId',
});
0.0.20240926
9 months ago
0.0.20240625
1 year ago
0.0.20240821
11 months ago
0.0.20240613
1 year ago
0.0.20240201
1 year ago
0.0.20230918
2 years ago
0.0.20230726
2 years ago
0.0.20230523
2 years ago
0.0.20230425
2 years ago
0.0.20230403
2 years ago
0.0.20230302
2 years ago
0.0.20230417
2 years ago
0.0.20230410
2 years ago
0.0.20230323
2 years ago
0.0.20230321
2 years ago
0.0.20230210
2 years ago
0.0.20230103
3 years ago
0.0.20230118
2 years ago
0.0.20220927
3 years ago
0.0.20221027
3 years ago
0.0.20221013
3 years ago
0.0.20220920
3 years ago
0.0.20220921
3 years ago
0.0.20220815
3 years ago
0.0.20220628
3 years ago