Skip to content

Commit

Permalink
feat(dfareporting): update the API
Browse files Browse the repository at this point in the history
#### dfareporting:v3.4
The following keys were added:
- resources.reports.methods.patch.description
- resources.reports.methods.patch.httpMethod
- resources.reports.methods.patch.id
- resources.reports.methods.patch.parameterOrder
- resources.reports.methods.patch.parameters.profileId.description
- resources.reports.methods.patch.parameters.profileId.format
- resources.reports.methods.patch.parameters.profileId.location
- resources.reports.methods.patch.parameters.profileId.required
- resources.reports.methods.patch.parameters.profileId.type
- resources.reports.methods.patch.parameters.reportId.description
- resources.reports.methods.patch.parameters.reportId.format
- resources.reports.methods.patch.parameters.reportId.location
- resources.reports.methods.patch.parameters.reportId.required
- resources.reports.methods.patch.parameters.reportId.type
- resources.reports.methods.patch.path
- resources.reports.methods.patch.request.$ref
- resources.reports.methods.patch.response.$ref
- resources.reports.methods.patch.scopes
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Aug 5, 2020
1 parent cdf4894 commit 6420be9
Show file tree
Hide file tree
Showing 2 changed files with 232 additions and 2 deletions.
39 changes: 37 additions & 2 deletions discovery/dfareporting-v3.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/doubleclick-advertisers/",
"etag": "\"-2NioU2H8y8siEzrBOV_qzRI6kQ/qc9rDDh3ersvNrKbY8B0EqQ-tKo\"",
"etag": "\"-2NioU2H8y8siEzrBOV_qzRI6kQ/PkTxU6cmNYCuywUBM2esTiF_8pQ\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/doubleclick-16.gif",
"x32": "https://www.google.com/images/icons/product/doubleclick-32.gif"
Expand Down Expand Up @@ -7795,6 +7795,41 @@
"https://www.googleapis.com/auth/dfareporting"
]
},
"patch": {
"description": "Updates a report. This method supports patch semantics.",
"httpMethod": "PATCH",
"id": "dfareporting.reports.patch",
"parameterOrder": [
"profileId",
"reportId"
],
"parameters": {
"profileId": {
"description": "The DFA user profile ID.",
"format": "int64",
"location": "path",
"required": true,
"type": "string"
},
"reportId": {
"description": "The ID of the report.",
"format": "int64",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "userprofiles/{profileId}/reports/{reportId}",
"request": {
"$ref": "Report"
},
"response": {
"$ref": "Report"
},
"scopes": [
"https://www.googleapis.com/auth/dfareporting"
]
},
"run": {
"description": "Runs a report.",
"httpMethod": "POST",
Expand Down Expand Up @@ -9395,7 +9430,7 @@
}
}
},
"revision": "20200722",
"revision": "20200730",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"Account": {
Expand Down
195 changes: 195 additions & 0 deletions src/apis/dfareporting/v3.4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36823,6 +36823,186 @@ export namespace dfareporting_v3_4 {
}
}

/**
* dfareporting.reports.patch
* @desc Updates a report. This method supports patch semantics.
* @example
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/dfareporting.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 dfareporting = google.dfareporting('v3.4');
*
* 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/dfareporting'],
* });
*
* // 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 dfareporting.reports.patch({
* // The DFA user profile ID.
* profileId: 'placeholder-value',
* // The ID of the report.
* reportId: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "accountId": "my_accountId",
* // "criteria": {},
* // "crossDimensionReachCriteria": {},
* // "delivery": {},
* // "etag": "my_etag",
* // "fileName": "my_fileName",
* // "floodlightCriteria": {},
* // "format": "my_format",
* // "id": "my_id",
* // "kind": "my_kind",
* // "lastModifiedTime": "my_lastModifiedTime",
* // "name": "my_name",
* // "ownerProfileId": "my_ownerProfileId",
* // "pathAttributionCriteria": {},
* // "pathCriteria": {},
* // "pathToConversionCriteria": {},
* // "reachCriteria": {},
* // "schedule": {},
* // "subAccountId": "my_subAccountId",
* // "type": "my_type"
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "accountId": "my_accountId",
* // "criteria": {},
* // "crossDimensionReachCriteria": {},
* // "delivery": {},
* // "etag": "my_etag",
* // "fileName": "my_fileName",
* // "floodlightCriteria": {},
* // "format": "my_format",
* // "id": "my_id",
* // "kind": "my_kind",
* // "lastModifiedTime": "my_lastModifiedTime",
* // "name": "my_name",
* // "ownerProfileId": "my_ownerProfileId",
* // "pathAttributionCriteria": {},
* // "pathCriteria": {},
* // "pathToConversionCriteria": {},
* // "reachCriteria": {},
* // "schedule": {},
* // "subAccountId": "my_subAccountId",
* // "type": "my_type"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* @alias dfareporting.reports.patch
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.profileId The DFA user profile ID.
* @param {string} params.reportId The ID of the report.
* @param {().Report} params.requestBody Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
patch(
params: Params$Resource$Reports$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Reports$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$Report>;
patch(
params: Params$Resource$Reports$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Reports$Patch,
options: MethodOptions | BodyResponseCallback<Schema$Report>,
callback: BodyResponseCallback<Schema$Report>
): void;
patch(
params: Params$Resource$Reports$Patch,
callback: BodyResponseCallback<Schema$Report>
): void;
patch(callback: BodyResponseCallback<Schema$Report>): void;
patch(
paramsOrCallback?:
| Params$Resource$Reports$Patch
| BodyResponseCallback<Schema$Report>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Report>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Report>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Report> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Reports$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Reports$Patch;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl +
'/dfareporting/v3.4/userprofiles/{profileId}/reports/{reportId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['profileId', 'reportId'],
pathParams: ['profileId', 'reportId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Report>(
parameters,
callback as BodyResponseCallback<{} | void>
);
} else {
return createAPIRequest<Schema$Report>(parameters);
}
}

/**
* dfareporting.reports.run
* @desc Runs a report.
Expand Down Expand Up @@ -37206,6 +37386,21 @@ export namespace dfareporting_v3_4 {
*/
sortOrder?: string;
}
export interface Params$Resource$Reports$Patch extends StandardParameters {
/**
* The DFA user profile ID.
*/
profileId?: string;
/**
* The ID of the report.
*/
reportId?: string;

/**
* Request body metadata
*/
requestBody?: Schema$Report;
}
export interface Params$Resource$Reports$Run extends StandardParameters {
/**
* The DFA profile ID.
Expand Down

0 comments on commit 6420be9

Please sign in to comment.