mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 05:30:20 +00:00
use fetchItems instead, reduce redundancy
This commit is contained in:
parent
4a7aac16be
commit
322c3427a1
1 changed files with 1 additions and 2 deletions
|
@ -187,8 +187,7 @@ class PlexServer(PlexObject):
|
||||||
def agents(self):
|
def agents(self):
|
||||||
""" Returns the :class:`~plexapi.media.Agent` objects this server has available. """
|
""" Returns the :class:`~plexapi.media.Agent` objects this server has available. """
|
||||||
key = '/system/agents'
|
key = '/system/agents'
|
||||||
data = self._server.query(key, self._server._session.get)
|
return self.fetchItems(key)
|
||||||
return self.findItems(data)
|
|
||||||
|
|
||||||
def createToken(self, type='delegation', scope='all'):
|
def createToken(self, type='delegation', scope='all'):
|
||||||
"""Create a temp access token for the server."""
|
"""Create a temp access token for the server."""
|
||||||
|
|
Loading…
Reference in a new issue