mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
This endpoint will allow clients to create a playground entry containing the name, pygments language and url_prefix for the playground of their choice. Introduced the `do_*` function in-charge of creating the entry in the model. Handling the process of sending events which will be done in a follow up commit. Added the openAPI format data to zulip.yaml for POST /realm/playgrounds. Also added python and curl examples for using the endpoint in its markdown documented (add-playground.md). Tests added.
33 lines
588 B
Markdown
33 lines
588 B
Markdown
# Add a playground
|
|
|
|
{generate_api_description(/realm/playgrounds:post)}
|
|
|
|
## Usage examples
|
|
|
|
{start_tabs}
|
|
{tab|python}
|
|
|
|
{generate_code_example(python)|/realm/playgrounds:post|example}
|
|
|
|
{tab|curl}
|
|
|
|
{generate_code_example(curl)|/realm/playgrounds:post|example}
|
|
|
|
{end_tabs}
|
|
|
|
## Parameters
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/realm/playgrounds:post}
|
|
|
|
## Response
|
|
|
|
#### Return values
|
|
|
|
{generate_return_values_table|zulip.yaml|/realm/playgrounds:post}
|
|
|
|
#### Example response
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
{generate_code_example|/realm/playgrounds:post|fixture(200)}
|