aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon/filters.py')
-rw-r--r--mastodon/filters.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/mastodon/filters.py b/mastodon/filters.py
index 5f373d4..8841ba8 100644
--- a/mastodon/filters.py
+++ b/mastodon/filters.py
@@ -29,8 +29,7 @@ class Mastodon(Internals):
29 Returns a :ref:`filter dict <filter dict>`. 29 Returns a :ref:`filter dict <filter dict>`.
30 """ 30 """
31 id = self.__unpack_id(id) 31 id = self.__unpack_id(id)
32 url = '/api/v1/filters/{0}'.format(str(id)) 32 return self.__api_request('GET', f'/api/v1/filters/{id}')
33 return self.__api_request('GET', url)
34 33
35 @api_version("2.4.3", "2.4.3", _DICT_VERSION_FILTER) 34 @api_version("2.4.3", "2.4.3", _DICT_VERSION_FILTER)
36 def filters_apply(self, objects, filters, context): 35 def filters_apply(self, objects, filters, context):
@@ -106,8 +105,7 @@ class Mastodon(Internals):
106 """ 105 """
107 id = self.__unpack_id(id) 106 id = self.__unpack_id(id)
108 params = self.__generate_params(locals(), ['id']) 107 params = self.__generate_params(locals(), ['id'])
109 url = '/api/v1/filters/{0}'.format(str(id)) 108 return self.__api_request('PUT', f'/api/v1/filters/{id}', params)
110 return self.__api_request('PUT', url, params)
111 109
112 @api_version("2.4.3", "2.4.3", "2.4.3") 110 @api_version("2.4.3", "2.4.3", "2.4.3")
113 def filter_delete(self, id): 111 def filter_delete(self, id):
@@ -115,5 +113,4 @@ class Mastodon(Internals):
115 Deletes the filter with the given `id`. 113 Deletes the filter with the given `id`.
116 """ 114 """
117 id = self.__unpack_id(id) 115 id = self.__unpack_id(id)
118 url = '/api/v1/filters/{0}'.format(str(id)) 116 self.__api_request('DELETE', f'/api/v1/filters/{id}')
119 self.__api_request('DELETE', url) \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)