From d7f5b4d66d47baa12d9e986c39385618adef0e71 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 28 Apr 2019 19:34:52 +0200 Subject: Implement the rest of the scheduled status endpoints --- mastodon/Mastodon.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mastodon') 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: """ return self.__api_request('GET', '/api/v1/scheduled_statuses') + @api_version("2.7.0", "2.7.0", __DICT_VERSION_SCHEDULED_STATUS) + def scheduled_status(self, id): + """ + Fetch information about the scheduled status with the given id. + + Returns a `scheduled toot dict`_. + """ + id = self.__unpack_id(id) + url = '/api/v1/scheduled_statuses/{0}'.format(str(id)) + return self.__api_request('GET', url) + ### # Reading data: Notifications ### @@ -1580,6 +1591,15 @@ class Mastodon: url = '/api/v1/scheduled_statuses/{0}'.format(str(id)) return self.__api_request('PUT', url, params) + @api_version("2.7.0", "2.7.0", "2.7.0") + def scheduled_status_delete(self, id): + """ + Deletes a scheduled status. + """ + id = self.__unpack_id(id) + url = '/api/v1/scheduled_statuses/{0}'.format(str(id)) + self.__api_request('DELETE', url) + ### # Writing data: Notifications ### -- cgit v1.2.3