diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-28 01:31:04 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-28 01:31:04 +0200 |
commit | c49364fcc4981eee500dcde34f2e494fdd15ff96 (patch) | |
tree | 18debe40c3bd42044f5f98a8bbab28be1e6aa60b /docs/04_auth.rst | |
parent | 13d6ff69e97452a014e40f8d511bbee6b39a392e (diff) | |
download | mastodon.py-c49364fcc4981eee500dcde34f2e494fdd15ff96.tar.gz |
Some more doc split tests
Diffstat (limited to 'docs/04_auth.rst')
-rw-r--r-- | docs/04_auth.rst | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/04_auth.rst b/docs/04_auth.rst new file mode 100644 index 0000000..454d6a2 --- /dev/null +++ b/docs/04_auth.rst | |||
@@ -0,0 +1,36 @@ | |||
1 | App registration and user authentication | ||
2 | ======================================== | ||
3 | |||
4 | Before you can use the Mastodon API, you have to register your | ||
5 | application (which gets you a client key and client secret) | ||
6 | and then log in (which gets you an access token) and out (revoking | ||
7 | the access token you are logged in with). These functions | ||
8 | allow you to do those things. Additionally, it is also possible | ||
9 | to programmatically register a new user. | ||
10 | |||
11 | For convenience, once you have a client id, secret and access token, | ||
12 | you can simply pass them to the constructor of the class, too! | ||
13 | |||
14 | Note that while it is perfectly reasonable to log back in whenever | ||
15 | your app starts, registering a new application on every | ||
16 | startup is not, so don't do that - instead, register an application | ||
17 | once, and then persist your client id and secret. A convenient method | ||
18 | for this is provided by the functions dealing with registering the app, | ||
19 | logging in and the Mastodon classes constructor. | ||
20 | |||
21 | To talk to an instance different from the flagship instance, specify | ||
22 | the api_base_url (usually, just the URL of the instance, i.e. | ||
23 | https://mastodon.social/ for the flagship instance). If no protocol | ||
24 | is specified, Mastodon.py defaults to https. | ||
25 | |||
26 | .. automethod:: Mastodon.create_app | ||
27 | .. automethod:: Mastodon.__init__ | ||
28 | .. _log_in(): | ||
29 | .. automethod:: Mastodon.log_in | ||
30 | .. _auth_request_url(): | ||
31 | .. automethod:: Mastodon.auth_request_url | ||
32 | .. _set_language(): | ||
33 | .. automethod:: Mastodon.set_language | ||
34 | .. automethod:: Mastodon.revoke_access_token | ||
35 | .. automethod:: Mastodon.create_account | ||
36 | .. automethod:: Mastodon.email_resend_confirmation | ||