googleapis / python-analytics-data

This library has moved to https://github.com/googleapis/google-cloud-python/tree/main/packages/google-analytics-data
Apache License 2.0
159 stars 36 forks source link

No way to set system parameters e.g. quotaUser #326

Closed 3dbrows closed 1 year ago

3dbrows commented 1 year ago

Environment details

The v1beta discovery document shows various parameters we can set, such as quotaUser. These are documented on the System Parameters page.

But how do we set such parameters using the BetaAnalyticsDataClient? It doesn't appear to be possible to set quotaUser on a BetaAnalyticsDataClient, nor even by trying to use a BetaAnalyticsDataRestTransport and hoping for some way to set URI query parameters. It also seems unlikely that a query interceptor can be of much help because that can only edit (for example) the body RunReportRequest or similar.

It appears that the Google API Client for Python supports quotaUser.

Three questions:

  1. Although not recommended, can the above-linked Google API Client for Python be used for the Google Analytics Data API v1 instead?
  2. Is quotaUser considered deprecated for the Google Analytics Data API v1?
  3. If the answers to the above are "no" and "no", can we take this issue to be a feature request to support system parameters in this Python Client for Analytics Data API?
3dbrows commented 1 year ago

I'm wondering if the correct answer here is:

hapdotpy commented 1 year ago

Hi @3dbrows, any chance you've figured this out? I'm facing the same issue but with RunReportRequest...

3dbrows commented 1 year ago

Hi @hapdotpy . I think my second comment is how to do it. The metadata argument seems to correspond to request headers.

parthea commented 1 year ago

I'm going to close this issue as resolved but please feel free to open a new issue with more information.