diff options
Diffstat (limited to 'docs/13_admin.rst')
-rw-r--r-- | docs/13_admin.rst | 60 |
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 @@ | |||
1 | Administration and moderation | ||
2 | ============================= | ||
3 | .. py:module:: mastodon | ||
4 | .. py:class: Mastodon | ||
5 | |||
6 | These functions allow you to perform moderation actions on users and generally | ||
7 | process 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 | ||
9 | access token), as well as at least moderator access. Mastodon.py will not request these | ||
10 | by default, as that would be very dangerous. | ||
11 | |||
12 | BIG WARNING: TREAT ANY ACCESS TOKENS THAT HAVE ADMIN CREDENTIALS AS EXTREMELY, MASSIVELY | ||
13 | SENSITIVE DATA AND MAKE EXTRA SURE TO REVOKE THEM AFTER TESTING, NOT LET THEM SIT IN FILES | ||
14 | SOMEWHERE, TRACK WHICH ARE ACTIVE, ET CETERA. ANY EXPOSURE OF SUCH ACCESS TOKENS MEANS YOU | ||
15 | EXPOSE THE PERSONAL DATA OF ALL YOUR USERS TO WHOEVER HAS THESE TOKENS. TREAT THEM WITH | ||
16 | EXTREME CARE. | ||
17 | |||
18 | This is not to say that you should not treat access tokens from admin accounts that do not | ||
19 | have admin: scopes attached with a lot of care, but be extra careful with those that do. | ||
20 | |||
21 | Accounts | ||
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 | |||
34 | Reports | ||
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 | |||
43 | Trends | ||
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 | |||
50 | Federation | ||
51 | ---------- | ||
52 | .. automethod:: Mastodon.admin_create_domain_block | ||
53 | .. automethod:: Mastodon.admin_update_domain_block | ||
54 | .. automethod:: Mastodon.admin_delete_domain_block | ||
55 | |||
56 | Moderation actions | ||
57 | ------------------ | ||
58 | .. automethod:: Mastodon.admin_measures | ||
59 | .. automethod:: Mastodon.admin_dimensions | ||
60 | .. automethod:: Mastodon.admin_retention \ No newline at end of file | ||