diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst index a98eb23..6e798d7 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -314,6 +314,7 @@ Toot dicts | |||
314 | 'replies_count': # The number of replies to this status. | 314 | 'replies_count': # The number of replies to this status. |
315 | 'card': # A preview card for links from the status, if present at time of delivery, | 315 | 'card': # A preview card for links from the status, if present at time of delivery, |
316 | # as card dict. | 316 | # as card dict. |
317 | 'poll': # A poll dict if a poll is attached to this status. | ||
317 | } | 318 | } |
318 | 319 | ||
319 | Mention dicts | 320 | Mention dicts |
@@ -355,7 +356,29 @@ Scheduled toot dicts | |||
355 | }, | 356 | }, |
356 | 'media_attachments': # Array of media dicts for the attachments to the scheduled toot | 357 | 'media_attachments': # Array of media dicts for the attachments to the scheduled toot |
357 | } | 358 | } |
358 | 359 | ||
360 | Poll dicts | ||
361 | ~~~~~~~~~~ | ||
362 | .. _poll dict: | ||
363 | |||
364 | .. code-block:: python | ||
365 | |||
366 | # Returns the following dictionary: | ||
367 | mastodon.poll(id) | ||
368 | { | ||
369 | 'id': # The polls ID | ||
370 | 'expires_at': # The time at which the poll is set to expire | ||
371 | 'expired': # Boolean denoting whether you can still vote in this poll | ||
372 | 'multiple': # Boolean indicating whether it is allowed to vote for more than one option | ||
373 | 'votes_count': # Total number of votes cast in this poll | ||
374 | 'voted': # Boolean indicating whether the logged-in user has already voted in this poll | ||
375 | 'options': # The poll options as a list of dicts, each option with a `title` and a | ||
376 | # `votes_count` field. `votes_count` can be None if the poll creator has | ||
377 | # chosen to hide vote totals until the poll expires and it hasn't yet. | ||
378 | 'emojis': # List of emoji dicts for all emoji used in answer strings | ||
379 | } | ||
380 | |||
381 | |||
359 | Conversation dicts | 382 | Conversation dicts |
360 | ~~~~~~~~~~~~~~~~~~ | 383 | ~~~~~~~~~~~~~~~~~~ |
361 | .. _conversation dict: | 384 | .. _conversation dict: |
@@ -797,13 +820,19 @@ These functions allow you to get information about single statuses. | |||
797 | .. automethod:: Mastodon.status_favourited_by | 820 | .. automethod:: Mastodon.status_favourited_by |
798 | .. automethod:: Mastodon.status_card | 821 | .. automethod:: Mastodon.status_card |
799 | 822 | ||
800 | Writing data: Scheduled statuses | 823 | Reading data: Scheduled statuses |
801 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 824 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
802 | These functions allow you to get information about scheduled statuses. | 825 | These functions allow you to get information about scheduled statuses. |
803 | 826 | ||
804 | .. automethod:: Mastodon.scheduled_statuses | 827 | .. automethod:: Mastodon.scheduled_statuses |
805 | .. automethod:: Mastodon.scheduled_status | 828 | .. automethod:: Mastodon.scheduled_status |
806 | 829 | ||
830 | Reading data: Polls | ||
831 | ~~~~~~~~~~~~~~~~~~~ | ||
832 | This function allows you to get and refresh information about polls. | ||
833 | |||
834 | .. automethod:: Mastodon.poll | ||
835 | |||
807 | Reading data: Notifications | 836 | Reading data: Notifications |
808 | --------------------------- | 837 | --------------------------- |
809 | This function allows you to get information about a users notifications. | 838 | This function allows you to get information about a users notifications. |
@@ -913,6 +942,8 @@ interact with already posted statuses. | |||
913 | .. automethod:: Mastodon.status_post | 942 | .. automethod:: Mastodon.status_post |
914 | .. automethod:: Mastodon.status_reply | 943 | .. automethod:: Mastodon.status_reply |
915 | .. automethod:: Mastodon.toot | 944 | .. automethod:: Mastodon.toot |
945 | .. _make_poll(): | ||
946 | .. automethod:: Mastodon.make_poll | ||
916 | .. automethod:: Mastodon.status_reblog | 947 | .. automethod:: Mastodon.status_reblog |
917 | .. automethod:: Mastodon.status_unreblog | 948 | .. automethod:: Mastodon.status_unreblog |
918 | .. automethod:: Mastodon.status_favourite | 949 | .. automethod:: Mastodon.status_favourite |
@@ -932,6 +963,12 @@ scheduled statuses. | |||
932 | .. automethod:: Mastodon.scheduled_status_update | 963 | .. automethod:: Mastodon.scheduled_status_update |
933 | .. automethod:: Mastodon.scheduled_status_delete | 964 | .. automethod:: Mastodon.scheduled_status_delete |
934 | 965 | ||
966 | Writing data: Polls | ||
967 | ~~~~~~~~~~~~~~~~~~~ | ||
968 | This function allows you to vote in polls. | ||
969 | |||
970 | .. automethod:: Mastodon.poll_vote | ||
971 | |||
935 | Writing data: Notifications | 972 | Writing data: Notifications |
936 | --------------------------- | 973 | --------------------------- |
937 | These functions allow you to clear all or some notifications. | 974 | These functions allow you to clear all or some notifications. |