zulip/templates/zerver/api/get-linkifiers.md
Abhijeet Prasad Bodas 3947b0c80a linkifiers: Update API to send data using dictionaries.
* This introduces a new event type `realm_linkifiers` and
a new key for the initial data fetch of the same name.
Newer clients will be expected to use these.

* Backwards compatibility is ensured by changing neither
the current event nor the /register key. The data which
these hold is the same as before, but internally, it is
generated by processing the `realm_linkifiers` data.
We send both the old and the new event types to clients
whenever the linkifiers are changed.
Older clients will simply ignore the new event type, and
vice versa.

* The `realm/filters:GET` endpoint (which returns tuples)
is currently used by none of the official Zulip clients.
This commit replaces it with `realm/linkifiers:GET` which
returns data in the new dictionary format.
TODO: Update the `get_realm_filters` method in the API
bindings, to hit this new URL instead of the old one.

* This also updates the webapp frontend to use the newer
events and keys.
2021-04-13 12:16:07 -07:00

33 lines
574 B
Markdown

# Get linkifiers
{generate_api_description(/realm/linkifiers:get)}
## Usage examples
{start_tabs}
{tab|python}
{generate_code_example(python)|/realm/linkifiers:get|example}
{tab|curl}
{generate_code_example(curl)|/realm/linkifiers:get|example}
{end_tabs}
## Parameters
{generate_api_arguments_table|zulip.yaml|/realm/linkifiers:get}
## Response
#### Return values
{generate_return_values_table|zulip.yaml|/realm/linkifiers:get}
#### Example response
A typical successful JSON response may look like:
{generate_code_example|/realm/linkifiers:get|fixture(200)}