diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/__init__.py | 0 | ||||
-rw-r--r-- | mastodon/toot.py | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mastodon/__init__.py b/mastodon/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mastodon/__init__.py | |||
diff --git a/mastodon/toot.py b/mastodon/toot.py new file mode 100644 index 0000000..2d07f0b --- /dev/null +++ b/mastodon/toot.py | |||
@@ -0,0 +1,21 @@ | |||
1 | from mastodon import Mastodon | ||
2 | |||
3 | ''' | ||
4 | https://mastodonpy.readthedocs.io/en/stable/index.html | ||
5 | |||
6 | Mastodon.create_app( | ||
7 | 'pytooterapp', | ||
8 | api_base_url = 'https://mastodon.social', | ||
9 | to_file = 'pytooter_clientcred.secret' | ||
10 | ) | ||
11 | ''' | ||
12 | |||
13 | # mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',) | ||
14 | # mastodon.log_in( | ||
15 | # '[email protected]', | ||
16 | # 'incrediblygoodpassword', | ||
17 | # to_file = 'pytooter_usercred.secret' | ||
18 | # ) | ||
19 | |||
20 | mastodon = Mastodon(access_token = 'pytooter_usercred.secret') | ||
21 | mastodon.toot('Tooting from Python using #mastodonpy !') \ No newline at end of file | ||