aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.rst16
-rw-r--r--mastodon/Mastodon.py20
2 files changed, 36 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst
index daae043..d6d0d04 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -777,6 +777,13 @@ These functions allow you to get information about single statuses.
777.. automethod:: Mastodon.status_favourited_by 777.. automethod:: Mastodon.status_favourited_by
778.. automethod:: Mastodon.status_card 778.. automethod:: Mastodon.status_card
779 779
780Writing data: Scheduled statuses
781~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
782These functions allow you to get information about scheduled statuses.
783
784.. automethod:: Mastodon.scheduled_statuses
785.. automethod:: Mastodon.scheduled_status
786
780Reading data: Notifications 787Reading data: Notifications
781--------------------------- 788---------------------------
782This function allows you to get information about a users notifications. 789This function allows you to get information about a users notifications.
@@ -891,6 +898,15 @@ interact with already posted statuses.
891.. automethod:: Mastodon.status_unpin 898.. automethod:: Mastodon.status_unpin
892.. automethod:: Mastodon.status_delete 899.. automethod:: Mastodon.status_delete
893 900
901Writing data: Scheduled statuses
902~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
903Mastodon allows you to schedule statuses (using `status_post()`_.
904The functions in this section allow you to update or delete thusly
905scheduled statuses.
906
907.. automethod:: Mastodon.scheduled_status_update
908.. automethod:: Mastodon.scheduled_status_delete
909
894Writing data: Notifications 910Writing data: Notifications
895--------------------------- 911---------------------------
896These functions allow you to clear all or some notifications. 912These functions allow you to clear all or some notifications.
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 97e8461..c037ceb 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -814,6 +814,17 @@ class Mastodon:
814 """ 814 """
815 return self.__api_request('GET', '/api/v1/scheduled_statuses') 815 return self.__api_request('GET', '/api/v1/scheduled_statuses')
816 816
817 @api_version("2.7.0", "2.7.0", __DICT_VERSION_SCHEDULED_STATUS)
818 def scheduled_status(self, id):
819 """
820 Fetch information about the scheduled status with the given id.
821
822 Returns a `scheduled toot dict`_.
823 """
824 id = self.__unpack_id(id)
825 url = '/api/v1/scheduled_statuses/{0}'.format(str(id))
826 return self.__api_request('GET', url)
827
817 ### 828 ###
818 # Reading data: Notifications 829 # Reading data: Notifications
819 ### 830 ###
@@ -1580,6 +1591,15 @@ class Mastodon:
1580 url = '/api/v1/scheduled_statuses/{0}'.format(str(id)) 1591 url = '/api/v1/scheduled_statuses/{0}'.format(str(id))
1581 return self.__api_request('PUT', url, params) 1592 return self.__api_request('PUT', url, params)
1582 1593
1594 @api_version("2.7.0", "2.7.0", "2.7.0")
1595 def scheduled_status_delete(self, id):
1596 """
1597 Deletes a scheduled status.
1598 """
1599 id = self.__unpack_id(id)
1600 url = '/api/v1/scheduled_statuses/{0}'.format(str(id))
1601 self.__api_request('DELETE', url)
1602
1583 ### 1603 ###
1584 # Writing data: Notifications 1604 # Writing data: Notifications
1585 ### 1605 ###
Powered by cgit v1.2.3 (git 2.41.0)