def searchPortal(portal, query=None, totalResults=None, sortField='numviews', sortOrder='desc', token=None):
    # Default results are returned by highest number of views in descending order.
    allResults = []
    if not totalResults or totalResults > 100:
        numResults = 100
    else:
        numResults = totalResults
    results = __search__(portal, query, numResults, sortField, sortOrder, 0, token)

    if not 'error' in results.keys():
        if not totalResults:
            totalResults = results['total'] # Return all of the results.
        allResults.extend(results['results'])
        while results['nextStart'] > 0 and results['nextStart'] < totalResults:
            # Do some math to ensure it only returns the total results requested.
            numResults = min(totalResults - results['nextStart'] + 1, 100)
            results = __search__(portal=portal, query=query, numResults=numResults, sortField=sortField,
                                sortOrder=sortOrder, token=token, start=results['nextStart'])
            allResults.extend(results['results'])
        return allResults
    else:
        print results['error']['message']
        return results
Will shrink the solitary client in the secondary pane
dataset/ETHPy150Open Esri/ago-tools/agoTools/utilities.py/searchPortal--crossover with--dataset/ETHPy150Open qtile/qtile/libqtile/layout/xmonad.py/MonadTall._shrink_solo_secondary