Mastodon.py/docs/05_statuses.rst

94 wiersze
2.7 KiB
ReStructuredText
Czysty Zwykły widok Historia

2022-11-28 22:50:02 +00:00
Statuses, media and polls
=========================
.. py:module:: mastodon
2025-02-15 20:26:08 +00:00
:no-index:
2022-11-28 22:50:02 +00:00
.. py:class: Mastodon
Statuses
--------
These functions allow you to get information about single statuses and to post and update them, as well as to favourite, bookmark, mute reblog ("boost") and to undo all of those.
For status pinning, check out TODO and TODO on the accounts page.
Reading
~~~~~~~
.. automethod:: Mastodon.status
.. automethod:: Mastodon.status_context
.. automethod:: Mastodon.status_reblogged_by
.. automethod:: Mastodon.status_favourited_by
.. automethod:: Mastodon.status_card
.. automethod:: Mastodon.status_history
.. automethod:: Mastodon.status_source
2025-02-14 22:09:39 +00:00
.. automethod:: Mastodon.statuses
2025-02-15 14:26:18 +00:00
2022-11-28 22:50:02 +00:00
.. automethod:: Mastodon.favourites
.. automethod:: Mastodon.bookmarks
Writing
~~~~~~~
.. _status_post():
.. automethod:: Mastodon.status_post
.. automethod:: Mastodon.status_reply
.. automethod:: Mastodon.toot
.. _make_poll():
.. automethod:: Mastodon.make_poll
.. automethod:: Mastodon.status_reblog
.. automethod:: Mastodon.status_unreblog
.. automethod:: Mastodon.status_favourite
.. automethod:: Mastodon.status_unfavourite
.. automethod:: Mastodon.status_mute
.. automethod:: Mastodon.status_unmute
.. automethod:: Mastodon.status_bookmark
.. automethod:: Mastodon.status_unbookmark
.. automethod:: Mastodon.status_delete
.. _status_update():
.. automethod:: Mastodon.status_update
2025-02-15 14:26:18 +00:00
.. automethod:: Mastodon.generate_media_edit_attributes
2022-11-28 22:50:02 +00:00
Scheduled statuses
------------------
These functions allow you to get information about scheduled statuses and to update scheduled statuses that already exist.
2022-11-30 17:04:26 +00:00
To create new scheduled statuses, use :ref:`status_post() <status_post()>` with the `scheduled_at` parameter.
2022-11-28 22:50:02 +00:00
Reading
~~~~~~~
.. automethod:: Mastodon.scheduled_statuses
.. automethod:: Mastodon.scheduled_status
Writing
~~~~~~~
.. automethod:: Mastodon.scheduled_status_update
.. automethod:: Mastodon.scheduled_status_delete
Media
-----
This function allows you to upload media to Mastodon and update media uploads.
The returned media IDs (Up to 4 at the same time on a default configuration Mastodon instance) can then be used with post_status to attach media to statuses.
.. _media_post():
.. automethod:: Mastodon.media_post
.. automethod:: Mastodon.media_update
2025-02-14 00:22:48 +00:00
.. automethod:: Mastodon.media
2022-11-28 22:50:02 +00:00
Polls
-----
This function allows you to get and refresh information about polls as well as to vote in polls
Reading
~~~~~~~
.. automethod:: Mastodon.poll
Writing
~~~~~~~
2025-02-15 15:27:04 +00:00
.. automethod:: Mastodon.poll_vote
Translation
-----------
These functions allow you to get machine translations for statuses, if the instance supports it.
2025-02-15 20:26:08 +00:00
.. automethod:: Mastodon.status_translate