camelCase formating

removeSections instead of remove_sections. update the doc string.
This commit is contained in:
blacktwin 2017-09-11 22:43:52 -04:00 committed by GitHub
parent 4ed895d5b6
commit f9f4b80b2b

View file

@ -216,7 +216,7 @@ class MyPlexAccount(PlexObject):
url = url.format(userId=user.id) url = url.format(userId=user.id)
return self.query(url, self._session.delete) return self.query(url, self._session.delete)
def updateFriend(self, user, server, sections=None, remove_sections=False, allowSync=False, allowCameraUpload=False, def updateFriend(self, user, server, sections=None, removeSections=False, allowSync=False, allowCameraUpload=False,
allowChannels=False, filterMovies=None, filterTelevision=None, filterMusic=None): allowChannels=False, filterMovies=None, filterTelevision=None, filterMusic=None):
""" Update the specified user's share settings. """ Update the specified user's share settings.
@ -224,6 +224,7 @@ class MyPlexAccount(PlexObject):
user (str): MyPlexUser, username, email of the user to be added. user (str): MyPlexUser, username, email of the user to be added.
server (PlexServer): PlexServer object or machineIdentifier containing the library sections to share. 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). sections: ([Section]): Library sections, names or ids to be shared (default None shares all sections).
removeSections (Bool): Set True to remove all shares.
allowSync (Bool): Set True to allow user to sync content. allowSync (Bool): Set True to allow user to sync content.
allowCameraUpload (Bool): Set True to allow user to upload photos. allowCameraUpload (Bool): Set True to allow user to upload photos.
allowChannels (Bool): Set True to allow user to utilize installed channels. allowChannels (Bool): Set True to allow user to utilize installed channels.
@ -251,7 +252,7 @@ class MyPlexAccount(PlexObject):
url = self.FRIENDINVITE.format(machineId=machineId) url = self.FRIENDINVITE.format(machineId=machineId)
# Remove share sections, add shares to user without shares, or update shares # Remove share sections, add shares to user without shares, or update shares
if remove_sections: if removeSections:
response_servers = self.query(url, self._session.delete, json=params, headers=headers) response_servers = self.query(url, self._session.delete, json=params, headers=headers)
elif 'invited_id' in params['shared_server']: elif 'invited_id' in params['shared_server']:
response_servers = self.query(url, self._session.post, json=params, headers=headers) response_servers = self.query(url, self._session.post, json=params, headers=headers)