Add a linkifier
Configure linkifiers,
regular expression patterns that are automatically linkified when they
appear in messages and topics.
POST https://bgst.chat.bundjugend.de/api/v1/realm/filters
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Add a filter to automatically linkify #<number> to the corresponding
# issue in Zulip's server repo
result = client.add_realm_filter(
"#(?P<id>[0-9]+)", "https://github.com/zulip/zulip/issues/%(id)s"
)
print(result)
curl -sSX POST https://bgst.chat.bundjugend.de/api/v1/realm/filters \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode 'pattern=#(?P<id>[0-9]+)' \
--data-urlencode 'url_format_string=https://github.com/zulip/zulip/issues/%(id)s'
Parameters
pattern string required
Example: "#(?P<id>[0-9]+)"
Response
Return values
Example response
A typical successful JSON response may look like:
{
"id": 42,
"msg": "",
"result": "success"
}