def inviteFriend(self, user, server, sections=None, allowSync=False, allowCameraUpload=False,<EOL>allowChannels=False, filterMovies=None, filterTelevision=None, filterMusic=None):
username = user.username if isinstance(user, MyPlexUser) else user<EOL>machineId = server.machineIdentifier if isinstance(server, PlexServer) else server<EOL>sectionIds = self._getSectionIds(machineId, sections)<EOL>params = {<EOL>'<STR_LIT>': machineId,<EOL>'<STR_LIT>': {'<STR_LIT>': sectionIds, '<STR_LIT>': username},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': ('<STR_LIT:1>' if allowSync else '<STR_LIT:0>'),<EOL>'<STR_LIT>': ('<STR_LIT:1>' if allowCameraUpload else '<STR_LIT:0>'),<EOL>'<STR_LIT>': ('<STR_LIT:1>' if allowChannels else '<STR_LIT:0>'),<EOL>'<STR_LIT>': self._filterDictToStr(filterMovies or {}),<EOL>'<STR_LIT>': self._filterDictToStr(filterTelevision or {}),<EOL>'<STR_LIT>': self._filterDictToStr(filterMusic or {}),<EOL>},<EOL>}<EOL>headers = {'<STR_LIT:Content-Type>': '<STR_LIT:application/json>'}<EOL>url = self.FRIENDINVITE.format(machineId=machineId)<EOL>return self.query(url, self._session.post, json=params, headers=headers)<EOL>
Share library content with the specified user.

            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).
                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']}