@@ -1148,14 +1148,15 @@ class RowIterator(HTTPIterator):
11481148 path (str): The method path to query for the list of items.
11491149 page_token (str): A token identifying a page in a result set to start
11501150 fetching results from.
1151- max_results (int): The maximum number of results to fetch.
1151+ max_results (int): (Optional) The maximum number of results to fetch.
1152+ page_size (int): (Optional) The number of items to return per page.
11521153 extra_params (dict): Extra query string parameters for the API call.
11531154
11541155 .. autoattribute:: pages
11551156 """
11561157
11571158 def __init__ (self , client , api_request , path , schema , page_token = None ,
1158- max_results = None , extra_params = None ):
1159+ max_results = None , page_size = None , extra_params = None ):
11591160 super (RowIterator , self ).__init__ (
11601161 client , api_request , path , item_to_value = _item_to_row ,
11611162 items_key = 'rows' , page_token = page_token , max_results = max_results ,
@@ -1164,6 +1165,21 @@ def __init__(self, client, api_request, path, schema, page_token=None,
11641165 self ._schema = schema
11651166 self ._field_to_index = _field_to_index_mapping (schema )
11661167 self ._total_rows = None
1168+ self ._page_size = page_size
1169+
1170+ def _get_next_page_response (self ):
1171+ """Requests the next page from the path provided.
1172+
1173+ Returns:
1174+ dict: The parsed JSON response of the next page's contents.
1175+ """
1176+ params = self ._get_query_params ()
1177+ if self ._page_size is not None :
1178+ params ['maxResults' ] = self ._page_size
1179+ return self .api_request (
1180+ method = self ._HTTP_METHOD ,
1181+ path = self .path ,
1182+ query_params = params )
11671183
11681184 @property
11691185 def schema (self ):
0 commit comments