mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
js_examples: Migrate and test get_stream_id example.
This commit is contained in:
committed by
Tim Abbott
parent
63127d4990
commit
2c5815edbb
@@ -41,6 +41,7 @@ const ExamplesHandler = function () {
|
||||
await generate_validation_data(client, examples.delete_queue);
|
||||
await generate_validation_data(client, examples.get_messages);
|
||||
await generate_validation_data(client, examples.get_own_user);
|
||||
await generate_validation_data(client, examples.get_stream_id);
|
||||
|
||||
console.log(JSON.stringify(response_data));
|
||||
return;
|
||||
@@ -150,4 +151,11 @@ add_example('get_own_user', '/users/me:get', 200, async (client) => {
|
||||
// {code_example|end}
|
||||
});
|
||||
|
||||
add_example('get_stream_id', '/get_stream_id:get', 200, async (client) => {
|
||||
// {code_example|start}
|
||||
// Get the ID of a given stream
|
||||
return await client.streams.getStreamId('Denmark');
|
||||
// {code_example|end}
|
||||
});
|
||||
|
||||
main();
|
||||
|
||||
Reference in New Issue
Block a user