mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Update server.py
add a way to get a transit token. Dunno about the name.
This commit is contained in:
parent
2b45284c3d
commit
4c04b76690
1 changed files with 7 additions and 2 deletions
|
@ -183,6 +183,11 @@ class PlexServer(PlexObject):
|
|||
data = self.query(Account.key)
|
||||
return Account(self, data)
|
||||
|
||||
def createToken(self, type='delegation', scope='all'):
|
||||
"""Create a temp access token for the server."""
|
||||
q = self.query('/security/token?type=%s&scope=%s' % (type, scope))
|
||||
return q.attrib.get('token')
|
||||
|
||||
def systemAccounts(self):
|
||||
""" Returns the :class:`~plexapi.server.SystemAccounts` objects this server contains. """
|
||||
accounts = []
|
||||
|
|
Loading…
Reference in a new issue