@google-analytics/data
Advanced tools
Comparing version 2.6.0 to 2.7.0
@@ -64,2 +64,7 @@ { | ||
"retry_params_name": "default" | ||
}, | ||
"CheckCompatibility": { | ||
"timeout_millis": 60000, | ||
"retry_codes_name": "unknown", | ||
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" | ||
} | ||
@@ -66,0 +71,0 @@ } |
@@ -120,2 +120,5 @@ import * as gax from 'google-gax'; | ||
runRealtimeReport(request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, callback: Callback<protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, protos.google.analytics.data.v1beta.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void; | ||
checkCompatibility(request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, (protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | undefined), {} | undefined]>; | ||
checkCompatibility(request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | null | undefined, {} | null | undefined>): void; | ||
checkCompatibility(request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, callback: Callback<protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | null | undefined, {} | null | undefined>): void; | ||
/** | ||
@@ -122,0 +125,0 @@ * Return a fully-qualified metadata resource name string. |
@@ -173,2 +173,3 @@ "use strict"; | ||
'runRealtimeReport', | ||
'checkCompatibility', | ||
]; | ||
@@ -266,8 +267,9 @@ for (const methodName of betaAnalyticsDataStubMethods) { | ||
* @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter | ||
* The filter clause of dimensions. Dimensions must be requested to be used in | ||
* this filter. Metrics cannot be used in this filter. | ||
* Dimension filters allow you to ask for only specific dimension values in | ||
* the report. To learn more, see [Fundamentals of Dimension | ||
* Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) | ||
* for examples. Metrics cannot be used in this filter. | ||
* @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter | ||
* The filter clause of metrics. Applied at post aggregation phase, similar to | ||
* SQL having-clause. Metrics must be requested to be used in this filter. | ||
* Dimensions cannot be used in this filter. | ||
* SQL having-clause. Dimensions cannot be used in this filter. | ||
* @param {number} request.offset | ||
@@ -663,2 +665,73 @@ * The row count of the start row. The first row is counted as row 0. | ||
} | ||
/** | ||
* This compatibility method lists dimensions and metrics that can be added to | ||
* a report request and maintain compatibility. This method fails if the | ||
* request's dimensions and metrics are incompatible. | ||
* | ||
* In Google Analytics, reports fail if they request incompatible dimensions | ||
* and/or metrics; in that case, you will need to remove dimensions and/or | ||
* metrics from the incompatible report until the report is compatible. | ||
* | ||
* The Realtime and Core reports have different compatibility rules. This | ||
* method checks compatibility for Core reports. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.property | ||
* A Google Analytics GA4 property identifier whose events are tracked. To | ||
* learn more, see [where to find your Property | ||
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). | ||
* `property` should be the same value as in your `runReport` request. | ||
* | ||
* Example: properties/1234 | ||
* | ||
* Set the Property ID to 0 for compatibility checking on dimensions and | ||
* metrics common to all properties. In this special mode, this method will | ||
* not return custom dimensions and metrics. | ||
* @param {number[]} request.dimensions | ||
* The dimensions in this report. `dimensions` should be the same value as in | ||
* your `runReport` request. | ||
* @param {number[]} request.metrics | ||
* The metrics in this report. `metrics` should be the same value as in your | ||
* `runReport` request. | ||
* @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter | ||
* The filter clause of dimensions. `dimensionFilter` should be the same value | ||
* as in your `runReport` request. | ||
* @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter | ||
* The filter clause of metrics. `metricFilter` should be the same value as in | ||
* your `runReport` request | ||
* @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter | ||
* Filters the dimensions and metrics in the response to just this | ||
* compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` | ||
* to only return compatible dimensions & metrics. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Promise} - The promise which resolves to an array. | ||
* The first element of the array is an object representing [CheckCompatibilityResponse]{@link google.analytics.data.v1beta.CheckCompatibilityResponse}. | ||
* Please see the | ||
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) | ||
* for more details and examples. | ||
* @example | ||
* const [response] = await client.checkCompatibility(request); | ||
*/ | ||
checkCompatibility(request, optionsOrCallback, callback) { | ||
request = request || {}; | ||
let options; | ||
if (typeof optionsOrCallback === 'function' && callback === undefined) { | ||
callback = optionsOrCallback; | ||
options = {}; | ||
} | ||
else { | ||
options = optionsOrCallback; | ||
} | ||
options = options || {}; | ||
options.otherArgs = options.otherArgs || {}; | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
gax.routingHeader.fromParams({ | ||
property: request.property || '', | ||
}); | ||
this.initialize(); | ||
return this.innerApiCalls.checkCompatibility(request, options, callback); | ||
} | ||
// -------------------- | ||
@@ -665,0 +738,0 @@ // -- Path templates -- |
# Changelog | ||
## [2.7.0](https://www.github.com/googleapis/nodejs-analytics-data/compare/v2.6.0...v2.7.0) (2021-09-01) | ||
### Features | ||
* add `CheckCompatibility` method to the API ([#141](https://www.github.com/googleapis/nodejs-analytics-data/issues/141)) ([62c787f](https://www.github.com/googleapis/nodejs-analytics-data/commit/62c787fe3cda77a924a1de119de0ac1893a9390c)) | ||
## [2.6.0](https://www.github.com/googleapis/nodejs-analytics-data/compare/v2.5.3...v2.6.0) (2021-08-23) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@google-analytics/data", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"description": "Data client for Node.js", | ||
@@ -5,0 +5,0 @@ "repository": "googleapis/nodejs-analytics-data", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
3624436
55030