@must_have_addon(SHORT_NAME, 'node')
@must_be_addon_authorizer(SHORT_NAME)
def googledrive_folder_list(node_addon, **kwargs):
    node = kwargs.get('node') or node_addon.owner

    path = request.args.get('path', '')
    folder_id = request.args.get('folderId', 'root')

    try:
        access_token = node_addon.fetch_access_token()
    except InvalidAuthError:
        raise HTTPError(403)

    client = GoogleDriveClient(access_token)

    if folder_id == 'root':
        about = client.about()

        return [{
            'path': '/',
            'kind': 'folder',
            'id': about['rootFolderId'],
            'name': '/ (Full Google Drive)',
            'urls': {
                'folders': node.api_url_for('googledrive_folder_list', folderId=about['rootFolderId'])
            }
        }]

    contents = [
        to_hgrid(item, node, path=path)
        for item in client.folders(folder_id)
    ]
    return contents
Returns all the subsequent folders under the folder id passed.
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/googledrive/views.py/googledrive_folder_list