zulip: Replace GET realm/filters with realm/linkifiers.

In zulip/zulip@3947b0c80a, we replaced
the legacy endpoint to use the term "linkifier" instead of
"filter" and to return the data in a dictionary format.

None of the official clients currently actually use this
endpoint.
This commit is contained in:
Abhijeet Prasad Bodas 2021-04-27 12:32:08 +05:30 committed by Tim Abbott
parent 3c3c361f50
commit 4d482e0ef3

View file

@ -900,15 +900,25 @@ class Client:
method='DELETE', method='DELETE',
) )
def get_realm_filters(self) -> Dict[str, Any]: def get_realm_linkifiers(self) -> Dict[str, Any]:
''' '''
Example usage: Example usage:
>>> client.get_realm_filters() >>> client.get_realm_linkifiers()
{'result': 'success', 'msg': '', 'filters': [['#(?P<id>[0-9]+)', 'https://github.com/zulip/zulip/issues/%(id)s', 1]]} {
'result': 'success',
'msg': '',
'linkifiers': [
{
'id': 1,
'pattern': #(?P<id>[0-9]+)',
'url_format': 'https://github.com/zulip/zulip/issues/%(id)s',
},
]
}
''' '''
return self.call_endpoint( return self.call_endpoint(
url='realm/filters', url='realm/linkifiers',
method='GET', method='GET',
) )