From a099e6cf153ae7155957bb16bc56233d2420288c Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Mon, 20 Feb 2023 01:09:37 -0800 Subject: add mastodon.py example --- mastodon/__init__.py | 0 mastodon/toot.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 mastodon/__init__.py create mode 100644 mastodon/toot.py (limited to 'mastodon') diff --git a/mastodon/__init__.py b/mastodon/__init__.py new file mode 100644 index 0000000..e69de29 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 @@ +from mastodon import Mastodon + +''' +https://mastodonpy.readthedocs.io/en/stable/index.html + +Mastodon.create_app( + 'pytooterapp', + api_base_url = 'https://mastodon.social', + to_file = 'pytooter_clientcred.secret' +) +''' + +# mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',) +# mastodon.log_in( +# 'my_login_email@example.com', +# 'incrediblygoodpassword', +# to_file = 'pytooter_usercred.secret' +# ) + +mastodon = Mastodon(access_token = 'pytooter_usercred.secret') +mastodon.toot('Tooting from Python using #mastodonpy !') \ No newline at end of file -- cgit v1.2.3