def updateFriend(self, user, server, sections=None, removeSections=False, allowSync=None, allowCameraUpload=None,<EOL>allowChannels=None, filterMovies=None, filterTelevision=None, filterMusic=None):
<EOL>response_filters = '<STR_LIT>'<EOL>response_servers = '<STR_LIT>'<EOL>user = user if isinstance(user, MyPlexUser) else self.user(user)<EOL>machineId = server.machineIdentifier if isinstance(server, PlexServer) else server<EOL>sectionIds = self._getSectionIds(machineId, sections)<EOL>headers = {'<STR_LIT:Content-Type>': '<STR_LIT:application/json>'}<EOL>user_servers = [s for s in user.servers if s.machineIdentifier == machineId]<EOL>if user_servers and sectionIds:<EOL><INDENT>serverId = user_servers[<NUM_LIT:0>].id<EOL>params = {'<STR_LIT>': machineId, '<STR_LIT>': {'<STR_LIT>': sectionIds}}<EOL>url = self.FRIENDSERVERS.format(machineId=machineId, serverId=serverId)<EOL><DEDENT>else:<EOL><INDENT>params = {'<STR_LIT>': machineId, '<STR_LIT>': {'<STR_LIT>': sectionIds,<EOL>"<STR_LIT>": user.id}}<EOL>url = self.FRIENDINVITE.format(machineId=machineId)<EOL><DEDENT>if not user_servers or sectionIds:<EOL><INDENT>if removeSections is True:<EOL><INDENT>response_servers = self.query(url, self._session.delete, json=params, headers=headers)<EOL><DEDENT>elif '<STR_LIT>' in params.get('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>response_servers = self.query(url, self._session.post, json=params, headers=headers)<EOL><DEDENT>else:<EOL><INDENT>response_servers = self.query(url, self._session.put, json=params, headers=headers)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>log.warning('<STR_LIT>')<EOL><DEDENT>url = self.FRIENDUPDATE.format(userId=user.id)<EOL>params = {}<EOL>if isinstance(allowSync, bool):<EOL><INDENT>params['<STR_LIT>'] = '<STR_LIT:1>' if allowSync else '<STR_LIT:0>'<EOL><DEDENT>if isinstance(allowCameraUpload, bool):<EOL><INDENT>params['<STR_LIT>'] = '<STR_LIT:1>' if allowCameraUpload else '<STR_LIT:0>'<EOL><DEDENT>if isinstance(allowChannels, bool):<EOL><INDENT>params['<STR_LIT>'] = '<STR_LIT:1>' if allowChannels else '<STR_LIT:0>'<EOL><DEDENT>if isinstance(filterMovies, dict):<EOL><INDENT>params['<STR_LIT>'] = self._filterDictToStr(filterMovies or {})  <EOL><DEDENT>if isinstance(filterTelevision, dict):<EOL><INDENT>params['<STR_LIT>'] = self._filterDictToStr(filterTelevision or {})<EOL><DEDENT>if isinstance(allowChannels, dict):<EOL><INDENT>params['<STR_LIT>'] = self._filterDictToStr(filterMusic or {})<EOL><DEDENT>if params:<EOL><INDENT>url += joinArgs(params)<EOL>response_filters = self.query(url, self._session.put)<EOL><DEDENT>return response_servers, response_filters<EOL>
Update the specified user's share settings.

            Parameters:
                user (str): MyPlexUser, username, email of the user to be added.
                server (PlexServer): PlexServer object or machineIdentifier containing the library sections to share.
                sections: ([Section]): Library sections, names or ids to be shared (default None shares all sections).
                removeSections (Bool): Set True to remove all shares. Supersedes sections.
                allowSync (Bool): Set True to allow user to sync content.
                allowCameraUpload (Bool): Set True to allow user to upload photos.
                allowChannels (Bool): Set True to allow user to utilize installed channels.
                filterMovies (Dict): Dict containing key 'contentRating' and/or 'label' each set to a list of
                    values to be filtered. ex: {'contentRating':['G'], 'label':['foo']}
                filterTelevision (Dict): Dict containing key 'contentRating' and/or 'label' each set to a list of
                    values to be filtered. ex: {'contentRating':['G'], 'label':['foo']}
                filterMusic (Dict): Dict containing key 'label' set to a list of values to be filtered.
                    ex: {'label':['foo']}