diff options
Diffstat (limited to 'mastodon/timeline.py')
-rw-r--r-- | mastodon/timeline.py | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/mastodon/timeline.py b/mastodon/timeline.py index b5a4068..04406ed 100644 --- a/mastodon/timeline.py +++ b/mastodon/timeline.py | |||
@@ -1,5 +1,7 @@ | |||
1 | # timeline.py - endpoints for reading various different timelines | ||
2 | |||
1 | from .versions import _DICT_VERSION_STATUS, _DICT_VERSION_CONVERSATION | 3 | from .versions import _DICT_VERSION_STATUS, _DICT_VERSION_CONVERSATION |
2 | from .error import MastodonIllegalArgumentError, MastodonNotFoundError | 4 | from .errors import MastodonIllegalArgumentError, MastodonNotFoundError |
3 | from .utility import api_version | 5 | from .utility import api_version |
4 | 6 | ||
5 | from .internals import Mastodon as Internals | 7 | from .internals import Mastodon as Internals |
@@ -101,21 +103,3 @@ class Mastodon(Internals): | |||
101 | id = self.__unpack_id(id) | 103 | id = self.__unpack_id(id) |
102 | return self.timeline('list/{0}'.format(id), max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote) | 104 | return self.timeline('list/{0}'.format(id), max_id=max_id, min_id=min_id, since_id=since_id, limit=limit, only_media=only_media, local=local, remote=remote) |
103 | 105 | ||
104 | @api_version("2.6.0", "2.6.0", _DICT_VERSION_CONVERSATION) | ||
105 | def conversations(self, max_id=None, min_id=None, since_id=None, limit=None): | ||
106 | """ | ||
107 | Fetches a user's conversations. | ||
108 | |||
109 | Returns a list of :ref:`conversation dicts <conversation dicts>`. | ||
110 | """ | ||
111 | if max_id is not None: | ||
112 | max_id = self.__unpack_id(max_id, dateconv=True) | ||
113 | |||
114 | if min_id is not None: | ||
115 | min_id = self.__unpack_id(min_id, dateconv=True) | ||
116 | |||
117 | if since_id is not None: | ||
118 | since_id = self.__unpack_id(since_id, dateconv=True) | ||
119 | |||
120 | params = self.__generate_params(locals()) | ||
121 | return self.__api_request('GET', "/api/v1/conversations/", params) | ||