js_examples: Migrate and test get_custom_emoji example.

This commit is contained in:
Kartik Srivastava
2020-06-22 00:13:09 +05:30
committed by Tim Abbott
parent eaa085a6f8
commit f96c86ad63
2 changed files with 8 additions and 11 deletions

View File

@@ -37,6 +37,7 @@ const ExamplesHandler = function () {
await generate_validation_data(client, examples.send_message);
await generate_validation_data(client, examples.create_user);
await generate_validation_data(client, examples.get_custom_emoji);
console.log(JSON.stringify(response_data));
return;
@@ -100,4 +101,10 @@ add_example('create_user', '/users:post', 200, async (client) => {
// {code_example|end}
});
add_example('get_custom_emoji', '/realm/emoji:get', 200, async (client) => {
// {code_example|start}
return await client.emojis.retrieve();
// {code_example|end}
});
main();