From 5cf0fa27a95f8c56280ea429dd1d57529fc490ee Mon Sep 17 00:00:00 2001 From: halcy Date: Sun, 27 Nov 2022 02:43:22 +0200 Subject: add admin stats APIs --- docs/index.rst | 49 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'docs/index.rst') diff --git a/docs/index.rst b/docs/index.rst index 95ae0aa..e7d52dc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -345,6 +345,18 @@ Toot dicts 'poll': # A poll dict if a poll is attached to this status. } +Status edit dicts +~~~~~~~~~~~~~~~~~ +.. _status edit dict: + +.. code-block:: python + + mastodonstatus_history(id)[0] + # Returns the following dictionary + { + TODO + } + Mention dicts ~~~~~~~~~~~~~ .. _mention dict: @@ -902,13 +914,37 @@ Admin domain block dicts 'obfuscate': #Boolean. True if domain name is obfuscated when listing. } -Status edit dicts -~~~~~~~~~~~~~~~~~ -.. _status edit dict: +Admin measure dicts +~~~~~~~~~~~~~~~~~~~ +.. _admin measure dict: .. code-block:: python - mastodonstatus_history(id)[0] + api.admin_measures(datetime.now() - timedelta(hours=24*5), datetime.now(), active_users=True) + # Returns the following dictionary + { + TODO + } + +Admin dimension dicts +~~~~~~~~~~~~~~~~~~~~~ +.. _admin dimension dict: + +.. code-block:: python + + api.admin_dimensions(datetime.now() - timedelta(hours=24*5), datetime.now(), languages=True) + # Returns the following dictionary + { + TODO + } + +Admin retention dicts +~~~~~~~~~~~~~~~~~~~~~ +.. _admin retention dict: + +.. code-block:: python + + api.admin_retention(datetime.now() - timedelta(hours=24*5), datetime.now()) # Returns the following dictionary { TODO @@ -1471,6 +1507,11 @@ have admin: scopes attached with a lot of care, but be extra careful with those .. automethod:: Mastodon.admin_update_domain_block .. automethod:: Mastodon.admin_delete_domain_block +.. automethod:: Mastodon.admin_measures +.. automethod:: Mastodon.admin_dimensions +.. automethod:: Mastodon.admin_retention + + Acknowledgements ---------------- Mastodon.py contains work by a large number of contributors, many of which have -- cgit v1.2.3