Add an alias to get stats as json

pull/2043/head
nicolargo 2022-04-17 10:29:22 +02:00
parent 9dbd0597f2
commit 96c6faf473
1 changed files with 4 additions and 0 deletions

View File

@ -425,6 +425,10 @@ class GlancesPlugin(object):
"""Return the stats object in JSON format."""
return self._json_dumps(self.stats)
def get_json(self):
"""Return the stats object in JSON format."""
return self.get_stats()
def get_stats_item(self, item):
"""Return the stats object for a specific item in JSON format.