def getUserFolders(self, userName=None):
        if userName == None:
            userName = self.user.username
        parameters = urllib.urlencode({'token': self.user.token, 'f': 'json'})
        request = self.user.portalUrl + '/sharing/rest/content/users/' + userName + '?' + parameters
        userContent = json.loads(urllib.urlopen(request).read())
        return userContent['folders']
Returns all folders (list of dictionaries) for an AGOL user.
dataset/ETHPy150Open Esri/ago-tools/agoTools/utilities.py/Utilities.getUserFolders