use fetchItems instead, reduce redundancy

This commit is contained in:
blacktwin 2020-03-16 13:23:33 -04:00
parent 4a7aac16be
commit 322c3427a1

View file

@ -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."""