diff options
author | Lorenz Diener <[email protected]> | 2019-04-28 19:34:52 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-04-28 19:34:52 +0200 |
commit | d7f5b4d66d47baa12d9e986c39385618adef0e71 (patch) | |
tree | 72b0f452d469e51326e42b1e67fbe12e6b4ab7dd /mastodon | |
parent | fe4e01f90eb76f68719611042e575a4fff32f9d0 (diff) | |
download | mastodon.py-d7f5b4d66d47baa12d9e986c39385618adef0e71.tar.gz |
Implement the rest of the scheduled status endpoints
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 20 |
1 files changed, 20 insertions, 0 deletions
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 | ### |