Skip to content

Commit 7714d0c

Browse files
authored
BigQuery: Documentation clarification for page_token (#4784)
1 parent 9f88d8d commit 7714d0c

File tree

1 file changed

+41
-20
lines changed

1 file changed

+41
-20
lines changed

bigquery/google/cloud/bigquery/client.py

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,17 @@ def list_projects(self, max_results=None, page_token=None,
134134
https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/list
135135
136136
:type max_results: int
137-
:param max_results: maximum number of projects to return, If not
138-
passed, defaults to a value set by the API.
137+
:param max_results: (Optional) maximum number of projects to return,
138+
If not passed, defaults to a value set by the API.
139139
140140
:type page_token: str
141-
:param page_token: opaque marker for the next "page" of projects. If
142-
not passed, the API will return the first page of
143-
projects.
141+
:param page_token:
142+
(Optional) Token representing a cursor into the projects. If
143+
not passed, the API will return the first page of projects.
144+
The token marks the beginning of the iterator to be returned
145+
and the value of the ``page_token`` can be accessed at
146+
``next_page_token`` of the
147+
:class:`~google.api_core.page_iterator.HTTPIterator`.
144148
145149
:type retry: :class:`google.api_core.retry.Retry`
146150
:param retry: (Optional) How to retry the RPC.
@@ -169,18 +173,22 @@ def list_datasets(self, include_all=False, filter=None, max_results=None,
169173
:param include_all: True if results include hidden datasets.
170174
171175
:type filter: str
172-
:param filter: an expression for filtering the results by label.
173-
For syntax, see
176+
:param filter: (Optional) an expression for filtering the results by
177+
label. For syntax, see
174178
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/list#filter.
175179
176180
:type max_results: int
177-
:param max_results: maximum number of datasets to return, If not
178-
passed, defaults to a value set by the API.
181+
:param max_results: (Optional) maximum number of datasets to return,
182+
if not passed, defaults to a value set by the API.
179183
180184
:type page_token: str
181-
:param page_token: opaque marker for the next "page" of datasets. If
182-
not passed, the API will return the first page of
183-
datasets.
185+
:param page_token:
186+
(Optional) Token representing a cursor into the datasets. If
187+
not passed, the API will return the first page of datasets.
188+
The token marks the beginning of the iterator to be returned
189+
and the value of the ``page_token`` can be accessed at
190+
``next_page_token`` of the
191+
:class:`~google.api_core.page_iterator.HTTPIterator`.
184192
185193
:type retry: :class:`google.api_core.retry.Retry`
186194
:param retry: (Optional) How to retry the RPC.
@@ -410,9 +418,13 @@ def list_tables(self, dataset, max_results=None, page_token=None,
410418
If not passed, defaults to a value set by the API.
411419
412420
:type page_token: str
413-
:param page_token: (Optional) Opaque marker for the next "page" of
414-
datasets. If not passed, the API will return the
415-
first page of datasets.
421+
:param page_token:
422+
(Optional) Token representing a cursor into the tables. If not
423+
passed, the API will return the first page of tables. The
424+
token marks the beginning of the iterator to be returned and
425+
the value of the ``page_token`` can be accessed at
426+
``next_page_token`` of the
427+
:class:`~google.api_core.page_iterator.HTTPIterator`.
416428
417429
:type retry: :class:`google.api_core.retry.Retry`
418430
:param retry: (Optional) How to retry the RPC.
@@ -644,9 +656,13 @@ def list_jobs(self, max_results=None, page_token=None, all_users=None,
644656
passed, defaults to a value set by the API.
645657
646658
:type page_token: str
647-
:param page_token: opaque marker for the next "page" of jobs. If
648-
not passed, the API will return the first page of
649-
jobs.
659+
:param page_token:
660+
(Optional) Opaque marker for the next "page" of jobs. If not
661+
passed, the API will return the first page of jobs. The token
662+
marks the beginning of the iterator to be returned and the
663+
value of the ``page_token`` can be accessed at
664+
``next_page_token`` of
665+
:class:`~google.api_core.page_iterator.HTTPIterator`.
650666
651667
:type all_users: bool
652668
:param all_users: if true, include jobs owned by all users in the
@@ -1225,11 +1241,16 @@ def list_rows(self, table, selected_fields=None, max_results=None,
12251241
:class:`~google.cloud.bigquery.table.TableReference`.
12261242
12271243
:type max_results: int
1228-
:param max_results: maximum number of rows to return.
1244+
:param max_results: (Optional) maximum number of rows to return.
12291245
12301246
:type page_token: str
12311247
:param page_token: (Optional) Token representing a cursor into the
1232-
table's rows.
1248+
table's rows. If not passed, the API will return
1249+
the first page of the rows. The token marks the
1250+
beginning of the iterator to be returned and the
1251+
value of the ``page_token`` can be accessed at
1252+
``next_page_token`` of the
1253+
:class:`~google.cloud.bigquery.table.RowIterator`.
12331254
12341255
:type start_index: int
12351256
:param start_index: (Optional) The zero-based index of the starting

0 commit comments

Comments
 (0)