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())