我一直在尝试从Google Reports API 示例中破译以下代码块
似乎该术语param['pagetoken']
应该是params['pagetoken']
我误读了这个吗?
all_logins = []
page_token = None
params = {'applicationName': 'login', 'userKey': 'all', 'startTime': start_time}
while True:
try:
if page_token:
param['pageToken'] = page_token
current_page = reports_service.activities().list(**params).execute()
all_logins.extend(current_page['items'])
page_token = current_page.get('nextPageToken')
if not page_token:
break
except errors.HttpError as error:
print 'An error occurred: %s' % error
break