Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 579a9cc

Browse filesBrowse files
committed
Adding gccl header for remaining HTTP Connections.
1 parent 5a9f079 commit 579a9cc
Copy full SHA for 579a9cc

File tree

Expand file treeCollapse file tree

11 files changed

+97
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

11 files changed

+97
-0
lines changed
Open diff view settings
Collapse file

‎bigquery/google/cloud/bigquery/_http.py‎

Copy file name to clipboardExpand all lines: bigquery/google/cloud/bigquery/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
from google.cloud import _http
1818

19+
from google.cloud.bigquery import __version__
20+
21+
22+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
23+
1924

2025
class Connection(_http.JSONConnection):
2126
"""A connection to Google BigQuery via the JSON REST API.
@@ -32,3 +37,7 @@ class Connection(_http.JSONConnection):
3237

3338
API_URL_TEMPLATE = '{api_base_url}/bigquery/{api_version}{path}'
3439
"""A template for the URL of a particular API call."""
40+
41+
_EXTRA_HEADERS = {
42+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
43+
}
Collapse file

‎dns/google/cloud/dns/_http.py‎

Copy file name to clipboardExpand all lines: dns/google/cloud/dns/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
from google.cloud import _http
1818

19+
from google.cloud.dns import __version__
20+
21+
22+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
23+
1924

2025
class Connection(_http.JSONConnection):
2126
"""A connection to Google Cloud DNS via the JSON REST API.
@@ -32,3 +37,7 @@ class Connection(_http.JSONConnection):
3237

3338
API_URL_TEMPLATE = '{api_base_url}/dns/{api_version}{path}'
3439
"""A template for the URL of a particular API call."""
40+
41+
_EXTRA_HEADERS = {
42+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
43+
}
Collapse file

‎language/google/cloud/language/_http.py‎

Copy file name to clipboardExpand all lines: language/google/cloud/language/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
from google.cloud import _http
1818

19+
from google.cloud.language import __version__
20+
21+
22+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
23+
1924

2025
class Connection(_http.JSONConnection):
2126
"""A connection to Google Cloud Natural Language JSON REST API.
@@ -32,3 +37,7 @@ class Connection(_http.JSONConnection):
3237

3338
API_URL_TEMPLATE = '{api_base_url}/{api_version}/documents:{path}'
3439
"""A template for the URL of a particular API call."""
40+
41+
_EXTRA_HEADERS = {
42+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
43+
}
Collapse file

‎logging/google/cloud/logging/_http.py‎

Copy file name to clipboardExpand all lines: logging/google/cloud/logging/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@
1818

1919
from google.cloud import _http
2020
from google.cloud.iterator import HTTPIterator
21+
22+
from google.cloud.logging import __version__
2123
from google.cloud.logging._helpers import entry_from_resource
2224
from google.cloud.logging.sink import Sink
2325
from google.cloud.logging.metric import Metric
2426

2527

28+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
29+
30+
2631
class Connection(_http.JSONConnection):
2732
"""A connection to Google Stackdriver Logging via the JSON REST API.
2833
@@ -39,6 +44,10 @@ class Connection(_http.JSONConnection):
3944
API_URL_TEMPLATE = '{api_base_url}/{api_version}{path}'
4045
"""A template for the URL of a particular API call."""
4146

47+
_EXTRA_HEADERS = {
48+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
49+
}
50+
4251

4352
class _LoggingAPI(object):
4453
"""Helper mapping logging-related APIs.
Collapse file

‎monitoring/google/cloud/monitoring/_http.py‎

Copy file name to clipboardExpand all lines: monitoring/google/cloud/monitoring/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
from google.cloud import _http
1818

19+
from google.cloud.monitoring import __version__
20+
21+
22+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
23+
1924

2025
class Connection(_http.JSONConnection):
2126
"""A connection to Google Stackdriver Monitoring via the JSON REST API.
@@ -32,3 +37,7 @@ class Connection(_http.JSONConnection):
3237

3338
API_URL_TEMPLATE = '{api_base_url}/{api_version}{path}'
3439
"""A template for the URL of a particular API call."""
40+
41+
_EXTRA_HEADERS = {
42+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
43+
}
Collapse file

‎pubsub/google/cloud/pubsub/_http.py‎

Copy file name to clipboardExpand all lines: pubsub/google/cloud/pubsub/_http.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from google.cloud import _http
2323
from google.cloud.environment_vars import PUBSUB_EMULATOR
2424
from google.cloud.iterator import HTTPIterator
25+
26+
from google.cloud.pubsub import __version__
2527
from google.cloud.pubsub._helpers import subscription_name_from_path
2628
from google.cloud.pubsub.subscription import Subscription
2729
from google.cloud.pubsub.topic import Topic
@@ -30,6 +32,8 @@
3032
PUBSUB_API_HOST = 'pubsub.googleapis.com'
3133
"""Pub / Sub API request host."""
3234

35+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
36+
3337

3438
class Connection(_http.JSONConnection):
3539
"""A connection to Google Cloud Pub/Sub via the JSON REST API.
@@ -47,6 +51,10 @@ class Connection(_http.JSONConnection):
4751
API_URL_TEMPLATE = '{api_base_url}/{api_version}{path}'
4852
"""A template for the URL of a particular API call."""
4953

54+
_EXTRA_HEADERS = {
55+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
56+
}
57+
5058
def __init__(self, client):
5159
super(Connection, self).__init__(client)
5260
emulator_host = os.getenv(PUBSUB_EMULATOR)
Collapse file

‎resource_manager/google/cloud/resource_manager/_http.py‎

Copy file name to clipboardExpand all lines: resource_manager/google/cloud/resource_manager/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
from google.cloud import _http
1919

20+
from google.cloud.resource_manager import __version__
21+
22+
23+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
24+
2025

2126
class Connection(_http.JSONConnection):
2227
"""A connection to Google Cloud Resource Manager via the JSON REST API.
@@ -33,3 +38,7 @@ class Connection(_http.JSONConnection):
3338

3439
API_URL_TEMPLATE = '{api_base_url}/{api_version}{path}'
3540
"""A template for the URL of a particular API call."""
41+
42+
_EXTRA_HEADERS = {
43+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
44+
}
Collapse file

‎runtimeconfig/google/cloud/runtimeconfig/_http.py‎

Copy file name to clipboardExpand all lines: runtimeconfig/google/cloud/runtimeconfig/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
from google.cloud import _http
2020

21+
from google.cloud.runtimeconfig import __version__
22+
23+
24+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
25+
2126

2227
class Connection(_http.JSONConnection):
2328
"""A connection to Google Cloud RuntimeConfig via the JSON REST API.
@@ -34,3 +39,7 @@ class Connection(_http.JSONConnection):
3439

3540
API_URL_TEMPLATE = '{api_base_url}/{api_version}{path}'
3641
"""A template for the URL of a particular API call."""
42+
43+
_EXTRA_HEADERS = {
44+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
45+
}
Collapse file

‎speech/google/cloud/speech/_http.py‎

Copy file name to clipboardExpand all lines: speech/google/cloud/speech/_http.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
from google.cloud._helpers import _to_bytes
2121
from google.cloud import _http
2222

23+
from google.cloud.speech import __version__
2324
from google.cloud.speech.result import Result
2425
from google.cloud.speech.operation import Operation
2526

2627

28+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
29+
30+
2731
class Connection(_http.JSONConnection):
2832
"""A connection to Google Cloud Speech JSON REST API.
2933
@@ -40,6 +44,10 @@ class Connection(_http.JSONConnection):
4044
API_URL_TEMPLATE = '{api_base_url}/{api_version}/{path}'
4145
"""A template for the URL of a particular API call."""
4246

47+
_EXTRA_HEADERS = {
48+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
49+
}
50+
4351

4452
class HTTPSpeechAPI(object):
4553
"""Speech API for interacting with the HTTP version of the API.
Collapse file

‎translate/google/cloud/translate/_http.py‎

Copy file name to clipboardExpand all lines: translate/google/cloud/translate/_http.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
from google.cloud import _http
1818

19+
from google.cloud.translate import __version__
20+
21+
22+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
23+
1924

2025
class Connection(_http.JSONConnection):
2126
"""A connection to Google Cloud Translation API via the JSON REST API.
@@ -32,3 +37,7 @@ class Connection(_http.JSONConnection):
3237

3338
API_URL_TEMPLATE = '{api_base_url}/language/translate/{api_version}{path}'
3439
"""A template for the URL of a particular API call."""
40+
41+
_EXTRA_HEADERS = {
42+
_http.CLIENT_INFO_HEADER: _CLIENT_INFO,
43+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.