diff --git a/templates/zerver/api.html b/templates/zerver/api.html index 54cfb20be8..61facc6b14 100644 --- a/templates/zerver/api.html +++ b/templates/zerver/api.html @@ -48,6 +48,13 @@ These code snippets are generated using our very own Zulip tool, by sending them to myself in a code block, and then using the inspector to pull out the resulting HTML :) + +Sample steps to do: +1. Write code in Zulip message box. +2. Put it in a multiline codeblock and specify a language. +3. Click on 'preview'. +4. Inspect and copy the HTML. + #}

Stream message

@@ -162,12 +169,12 @@ to pull out the resulting HTML :) }); // Register queue to receive messages for user -zulip.queues.register({ +client.queues.register({ event_types: ['message'] }).then((res) => { // Retrieve events from a queue // Blocking until there is an event (or the request times out) - zulip.events.retrieve({ + client.events.retrieve({ queue_id: res.queue_id, last_event_id: -1, dont_block: false