Rename stdout fields to apidoc

This commit is contained in:
nicolargo 2021-07-16 16:47:27 +02:00
parent 10ae52bea6
commit 01d0846212
1 changed files with 12 additions and 0 deletions

View File

@ -155,5 +155,17 @@ class GlancesStdoutApiDoc(object):
print(indent_stat(json.loads(stat.get_stats_value(item, value))))
print('')
# Get all stats
sub_title = 'GET all stats'
print(sub_title)
print('-' * len(sub_title))
print('')
print('.. code-block:: json')
print('')
print(' # curl {}/all'.format(API_URL))
print(indent_stat(json.loads(stat.getAllViewsAsDict())))
print('')
# Return True to exit directly (no refresh)
return True