Skip to content

Commit d64d5e2

Browse files
authored
Docs/fixit: normalize docs for 'page_size' / 'max_results' / 'page_token' (#6842)
1 parent 70b94f8 commit d64d5e2

File tree

2 files changed

+40
-20
lines changed

2 files changed

+40
-20
lines changed

google/cloud/logging/client.py

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,18 @@ def list_entries(
191191
or :data:`~google.cloud.logging.DESCENDING`.
192192
193193
:type page_size: int
194-
:param page_size: maximum number of entries to return, If not passed,
195-
defaults to a value set by the API.
194+
:param page_size:
195+
Optional. The maximum number of entries in each page of results
196+
from this request. Non-positive values are ignored. Defaults
197+
to a sensible value set by the API.
196198
197199
:type page_token: str
198-
:param page_token: opaque marker for the next "page" of entries. If not
199-
passed, the API will return the first page of
200-
entries.
200+
:param page_token:
201+
Optional. If present, return the next batch of entries, using
202+
the value, which must correspond to the ``nextPageToken`` value
203+
returned in the previous response. Deprecated: use the ``pages``
204+
property of the returned iterator instead of manually passing
205+
the token.
201206
202207
:rtype: :class:`~google.api_core.page_iterator.Iterator`
203208
:returns: Iterator of :class:`~google.cloud.logging.entries._BaseEntry`
@@ -244,13 +249,18 @@ def list_sinks(self, page_size=None, page_token=None):
244249
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list
245250
246251
:type page_size: int
247-
:param page_size: maximum number of sinks to return, If not passed,
248-
defaults to a value set by the API.
252+
:param page_size:
253+
Optional. The maximum number of sinks in each page of results from
254+
this request. Non-positive values are ignored. Defaults to a
255+
sensible value set by the API.
249256
250257
:type page_token: str
251-
:param page_token: opaque marker for the next "page" of sinks. If not
252-
passed, the API will return the first page of
253-
sinks.
258+
:param page_token:
259+
Optional. If present, return the next batch of sinks, using the
260+
value, which must correspond to the ``nextPageToken`` value
261+
returned in the previous response. Deprecated: use the ``pages``
262+
property of the returned iterator instead of manually passing the
263+
token.
254264
255265
:rtype: :class:`~google.api_core.page_iterator.Iterator`
256266
:returns: Iterator of
@@ -288,13 +298,18 @@ def list_metrics(self, page_size=None, page_token=None):
288298
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
289299
290300
:type page_size: int
291-
:param page_size: maximum number of metrics to return, If not passed,
292-
defaults to a value set by the API.
301+
:param page_size:
302+
Optional. The maximum number of metrics in each page of results
303+
from this request. Non-positive values are ignored. Defaults to a
304+
sensible value set by the API.
293305
294306
:type page_token: str
295-
:param page_token: opaque marker for the next "page" of metrics. If not
296-
passed, the API will return the first page of
297-
metrics.
307+
:param page_token:
308+
Optional. If present, return the next batch of metrics, using the
309+
value, which must correspond to the ``nextPageToken`` value
310+
returned in the previous response. Deprecated: use the ``pages``
311+
property of the returned iterator instead of manually passing the
312+
token.
298313
299314
:rtype: :class:`~google.api_core.page_iterator.Iterator`
300315
:returns: Iterator of :class:`~google.cloud.logging.metric.Metric`

google/cloud/logging/logger.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,18 @@ def list_entries(
249249
or :data:`~google.cloud.logging.DESCENDING`.
250250
251251
:type page_size: int
252-
:param page_size: maximum number of entries to return, If not passed,
253-
defaults to a value set by the API.
252+
:param page_size:
253+
Optional. The maximum number of entries in each page of results
254+
from this request. Non-positive values are ignored. Defaults
255+
to a sensible value set by the API.
254256
255257
:type page_token: str
256-
:param page_token: opaque marker for the next "page" of entries. If not
257-
passed, the API will return the first page of
258-
entries.
258+
:param page_token:
259+
Optional. If present, return the next batch of entries, using
260+
the value, which must correspond to the ``nextPageToken`` value
261+
returned in the previous response. Deprecated: use the ``pages``
262+
property of the returned iterator instead of manually passing
263+
the token.
259264
260265
:rtype: :class:`~google.api_core.page_iterator.Iterator`
261266
:returns: Iterator of log entries accessible to the current logger.

0 commit comments

Comments
 (0)