aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/13_admin.rst')
-rw-r--r--docs/13_admin.rst60
1 files changed, 60 insertions, 0 deletions
diff --git a/docs/13_admin.rst b/docs/13_admin.rst
new file mode 100644
index 0000000..1c97d2c
--- /dev/null
+++ b/docs/13_admin.rst
@@ -0,0 +1,60 @@
1Administration and moderation
2=============================
3.. py:module:: mastodon
4.. py:class: Mastodon
5
6These functions allow you to perform moderation actions on users and generally
7process reports using the API. To do this, you need access to the "admin:read" and/or
8"admin:write" scopes or their more granular variants (both for the application and the
9access token), as well as at least moderator access. Mastodon.py will not request these
10by default, as that would be very dangerous.
11
12BIG WARNING: TREAT ANY ACCESS TOKENS THAT HAVE ADMIN CREDENTIALS AS EXTREMELY, MASSIVELY
13SENSITIVE DATA AND MAKE EXTRA SURE TO REVOKE THEM AFTER TESTING, NOT LET THEM SIT IN FILES
14SOMEWHERE, TRACK WHICH ARE ACTIVE, ET CETERA. ANY EXPOSURE OF SUCH ACCESS TOKENS MEANS YOU
15EXPOSE THE PERSONAL DATA OF ALL YOUR USERS TO WHOEVER HAS THESE TOKENS. TREAT THEM WITH
16EXTREME CARE.
17
18This is not to say that you should not treat access tokens from admin accounts that do not
19have admin: scopes attached with a lot of care, but be extra careful with those that do.
20
21Accounts
22--------
23.. automethod:: Mastodon.admin_accounts_v2
24.. automethod:: Mastodon.admin_accounts
25.. automethod:: Mastodon.admin_accounts_v1
26.. automethod:: Mastodon.admin_account
27.. automethod:: Mastodon.admin_account_enable
28.. automethod:: Mastodon.admin_account_approve
29.. automethod:: Mastodon.admin_account_reject
30.. automethod:: Mastodon.admin_account_unsilence
31.. automethod:: Mastodon.admin_account_unsuspend
32.. automethod:: Mastodon.admin_account_moderate
33
34Reports
35-------
36.. automethod:: Mastodon.admin_reports
37.. automethod:: Mastodon.admin_report
38.. automethod:: Mastodon.admin_report_assign
39.. automethod:: Mastodon.admin_report_unassign
40.. automethod:: Mastodon.admin_report_reopen
41.. automethod:: Mastodon.admin_report_resolve
42
43Trends
44------
45.. automethod:: Mastodon.admin_trending_tags
46.. automethod:: Mastodon.admin_trending_statuses
47.. automethod:: Mastodon.admin_trending_links
48.. automethod:: Mastodon.admin_domain_blocks
49
50Federation
51----------
52.. automethod:: Mastodon.admin_create_domain_block
53.. automethod:: Mastodon.admin_update_domain_block
54.. automethod:: Mastodon.admin_delete_domain_block
55
56Moderation actions
57------------------
58.. automethod:: Mastodon.admin_measures
59.. automethod:: Mastodon.admin_dimensions
60.. automethod:: Mastodon.admin_retention \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)