Skip to content

Commit ffa4934

Browse files
committed
Distinguish API helper docstrings.
Add links to relevant REST API docs. Addresses: #1820 (comment)
1 parent c617264 commit ffa4934

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

gcloud/logging/client.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,34 @@ class Client(JSONClient):
5353

5454
@property
5555
def logging_api(self):
56-
"""Helper for logging-related API calls."""
56+
"""Helper for logging-related API calls.
57+
58+
See:
59+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries
60+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs
61+
"""
5762
if self._logging_api is None:
5863
self._logging_api = _LoggingAPI(self.connection)
5964
return self._logging_api
6065

6166
@property
6267
def sinks_api(self):
63-
"""Helper for logging-related API calls."""
68+
"""Helper for log sink-related API calls.
69+
70+
See:
71+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks
72+
"""
6473
if self._sinks_api is None:
6574
self._sinks_api = _SinksAPI(self.connection)
6675
return self._sinks_api
6776

6877
@property
6978
def metrics_api(self):
70-
"""Helper for logging-related API calls."""
79+
"""Helper for log metric-related API calls.
80+
81+
See:
82+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics
83+
"""
7184
if self._metrics_api is None:
7285
self._metrics_api = _MetricsAPI(self.connection)
7386
return self._metrics_api

gcloud/logging/connection.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ class Connection(base_connection.JSONConnection):
5151
class _LoggingAPI(object):
5252
"""Helper mapping logging-related APIs.
5353
54+
See:
55+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries
56+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs
57+
5458
:type connection: :class:`gcloud.logging.connection.Connection`
5559
:param connection: the connection used to make API requests.
5660
"""
@@ -164,6 +168,9 @@ def logger_delete(self, project, logger_name):
164168
class _SinksAPI(object):
165169
"""Helper mapping sink-related APIs.
166170
171+
See:
172+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks
173+
167174
:type connection: :class:`gcloud.logging.connection.Connection`
168175
:param connection: the connection used to make API requests.
169176
"""
@@ -298,6 +305,9 @@ def sink_delete(self, project, sink_name):
298305
class _MetricsAPI(object):
299306
"""Helper mapping sink-related APIs.
300307
308+
See:
309+
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics
310+
301311
:type connection: :class:`gcloud.logging.connection.Connection`
302312
:param connection: the connection used to make API requests.
303313
"""

0 commit comments

Comments
 (0)