diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/docs/index.rst b/docs/index.rst index 47016ed..6a65b7b 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -791,7 +791,37 @@ Read marker dicts | |||
791 | 'version': # A counter that is incremented whenever the marker is set to a new status | 791 | 'version': # A counter that is incremented whenever the marker is set to a new status |
792 | 'updated_at': # The time the marker was last set, as a datetime object | 792 | 'updated_at': # The time the marker was last set, as a datetime object |
793 | } | 793 | } |
794 | 794 | ||
795 | Announcement dicts | ||
796 | ~~~~~~~~~~~~~~~~~~ | ||
797 | .. _announcement dict: | ||
798 | |||
799 | .. code-block:: python | ||
800 | |||
801 | mastodon.annoucements()[0] | ||
802 | # Returns the following dictionary: | ||
803 | { | ||
804 | 'id': # The annoucements id | ||
805 | 'content': # The contents of the annoucement, as an html string | ||
806 | 'starts_at': # The annoucements start time, as a datetime object. Can be None | ||
807 | 'ends_at': # The annoucements end time, as a datetime object. Can be None | ||
808 | 'all_day': # Boolean indicating whether the annoucement represents an "all day" event | ||
809 | 'published_at': # The annoucements publish time, as a datetime object | ||
810 | 'updated_at': # The annoucements last updated time, as a datetime object | ||
811 | 'read': # A boolean indicating whether the logged in user has dismissed the annoucement | ||
812 | 'mentions': # Users mentioned in the annoucement, as a list of mention dicts | ||
813 | 'tags': # Hashtags mentioned in the announcement, as a list of hashtag dicts | ||
814 | 'emojis': # Custom emoji used in the annoucement, as a list of emoji dicts | ||
815 | 'reactions': # Reactions to the annoucement, as a list of reaction dicts (documented inline here): | ||
816 | [ { | ||
817 | 'name': '# Name of the custom emoji or unicode emoji of the reaction | ||
818 | 'count': # Reaction counter (i.e. number of users who have added this reaction) | ||
819 | 'me': # True if the logged-in user has reacted with this emoji, false otherwise | ||
820 | 'url': # URL for the custom emoji image | ||
821 | 'static_url': # URL for a never-animated version of the custom emoji image | ||
822 | } ], | ||
823 | } | ||
824 | |||
795 | Admin account dicts | 825 | Admin account dicts |
796 | ~~~~~~~~~~~~~~~~~~~ | 826 | ~~~~~~~~~~~~~~~~~~~ |
797 | .. _admin account dict: | 827 | .. _admin account dict: |
@@ -1053,6 +1083,11 @@ Reading data: Preferences | |||
1053 | 1083 | ||
1054 | .. automethod:: Mastodon.preferences | 1084 | .. automethod:: Mastodon.preferences |
1055 | 1085 | ||
1086 | Reading data: Announcements | ||
1087 | -------------------------- | ||
1088 | |||
1089 | .. automethod:: Mastodon.announcements | ||
1090 | |||
1056 | 1091 | ||
1057 | Writing data: Statuses | 1092 | Writing data: Statuses |
1058 | ---------------------- | 1093 | ---------------------- |
@@ -1193,6 +1228,15 @@ for the logged-in user. | |||
1193 | .. automethod:: Mastodon.domain_block | 1228 | .. automethod:: Mastodon.domain_block |
1194 | .. automethod:: Mastodon.domain_unblock | 1229 | .. automethod:: Mastodon.domain_unblock |
1195 | 1230 | ||
1231 | |||
1232 | Writing data: Announcements | ||
1233 | --------------------------- | ||
1234 | These functions allow you to mark annoucements read and modify reactions. | ||
1235 | |||
1236 | .. automethod:: Mastodon.announcement_dismiss | ||
1237 | .. automethod:: Mastodon.announcement_reaction_create | ||
1238 | .. automethod:: Mastodon.announcement_reaction_delete | ||
1239 | |||
1196 | Pagination | 1240 | Pagination |
1197 | ---------- | 1241 | ---------- |
1198 | These functions allow for convenient retrieval of paginated data. | 1242 | These functions allow for convenient retrieval of paginated data. |