'Takes parsed JSON response from \'index\' action on api, and updates the available subset of user information.
ONLY callable if this User object represents the currently logged in user. Throws InvalidUserException otherwise.'

def set_index_data(self, index_json_response):

    if (self.id != index_json_response['id']):
        raise InvalidUserException(("Tried    to    update    non-logged-in    User's    information    from    'index'    API    call." + ('    Should    be    %s,    got    %s' % (self.id, index_json_response['id']))))
    self.username = index_json_response['username']
    self.authkey = index_json_response['authkey']
    self.passkey = index_json_response['passkey']
    self.notifications = index_json_response['notifications']
    if self.stats:
        self.stats = dict((self.stats.items() + index_json_response['userstats'].items()))
    else:
        self.stats = index_json_response['userstats']
    if self.personal:
        self.personal['class'] = self.stats['class']
        self.personal['passkey'] = self.passkey
