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):
""" Returns the :class:`~plexapi.media.Agent` objects this server has available. """
key = '/system/agents'
data = self._server.query(key, self._server._session.get)
return self.findItems(data)
return self.fetchItems(key)
def createToken(self, type='delegation', scope='all'):
"""Create a temp access token for the server."""