From 4d9b3226fd592d49c1e97283b3c25ee8d8e3e72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Tue, 3 Jul 2018 20:07:51 +0200 Subject: [PATCH] api: Implement GET /realm/emoji. --- zulip/zulip/__init__.py | 10 ++++++++++ zulip/zulip/examples/realm-emoji | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 zulip/zulip/examples/realm-emoji diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 7fed05f..c31a268 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -769,6 +769,16 @@ class Client(object): method='GET' ) + def get_realm_emoji(self): + # type: () -> Dict[str, Any] + ''' + See examples/realm-emoji for example usage. + ''' + return self.call_endpoint( + url='/realm/emoji', + method='GET' + ) + def get_events(self, **request): # type: (**Any) -> Dict[str, Any] ''' diff --git a/zulip/zulip/examples/realm-emoji b/zulip/zulip/examples/realm-emoji new file mode 100755 index 0000000..adea86c --- /dev/null +++ b/zulip/zulip/examples/realm-emoji @@ -0,0 +1,18 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import argparse + +import zulip + +usage = """realm-emoji [options] + +Example: realm-emoji +""" + +parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage)) +options = parser.parse_args() + +client = zulip.init_from_options(options) + +print(client.get_realm_emoji())