api: Implement GET /realm/emoji.
This commit is contained in:
parent
a96c3f0db0
commit
4d9b3226fd
|
@ -769,6 +769,16 @@ class Client(object):
|
||||||
method='GET'
|
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):
|
def get_events(self, **request):
|
||||||
# type: (**Any) -> Dict[str, Any]
|
# type: (**Any) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
|
|
18
zulip/zulip/examples/realm-emoji
Executable file
18
zulip/zulip/examples/realm-emoji
Executable file
|
@ -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())
|
Loading…
Reference in a new issue