diff --git a/templates/zerver/api/get-all-streams.md b/templates/zerver/api/get-all-streams.md index b4732ecb21..e72aa758a5 100644 --- a/templates/zerver/api/get-all-streams.md +++ b/templates/zerver/api/get-all-streams.md @@ -60,17 +60,14 @@ More examples and documentation can be found [here](https://github.com/zulip/zul ```js const zulip = require('zulip-js'); +// Download zuliprc-dev from your dev server const config = { - username: 'othello-bot@example.com', - apiKey: 'a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5', - realm: '{{ api_url }}' + zuliprc: 'zuliprc-dev', }; -const client = zulip(config); - -// Get all streams that the user has access to -client.streams.retrieve().then(res => { - console.log(res); +zulip(config).then((client) => { + // Get all streams that the user has access to + client.streams.retrieve().then(console.log); }); ```