zulip: Move examples to zulip/examples.
This commit is contained in:
parent
2f62507987
commit
2f044b44bd
|
@ -1,11 +1,11 @@
|
||||||
recursive-include integrations *
|
recursive-include integrations *
|
||||||
include README.md
|
include README.md
|
||||||
include examples/zuliprc
|
include zulip/examples/zuliprc
|
||||||
include examples/send-message
|
include zulip/examples/send-message
|
||||||
include examples/subscribe
|
include zulip/examples/subscribe
|
||||||
include examples/get-public-streams
|
include zulip/examples/get-public-streams
|
||||||
include examples/unsubscribe
|
include zulip/examples/unsubscribe
|
||||||
include examples/list-members
|
include zulip/examples/list-members
|
||||||
include examples/list-subscriptions
|
include zulip/examples/list-subscriptions
|
||||||
include examples/print-messages
|
include zulip/examples/print-messages
|
||||||
include examples/recent-messages
|
include zulip/examples/recent-messages
|
||||||
|
|
|
@ -21,7 +21,7 @@ please make sure we know you're using them so that we can notify you
|
||||||
as we make any changes to them.
|
as we make any changes to them.
|
||||||
|
|
||||||
The easiest way to use these API bindings is to base your tools off
|
The easiest way to use these API bindings is to base your tools off
|
||||||
of the example tools under examples/ in this distribution.
|
of the example tools under zulip/examples/ in this distribution.
|
||||||
|
|
||||||
If you place your API key in the config file `~/.zuliprc` the Python
|
If you place your API key in the config file `~/.zuliprc` the Python
|
||||||
API bindings will automatically read it in. The format of the config
|
API bindings will automatically read it in. The format of the config
|
||||||
|
|
|
@ -42,19 +42,19 @@ package_info = dict(
|
||||||
],
|
],
|
||||||
url='https://www.zulip.org/',
|
url='https://www.zulip.org/',
|
||||||
data_files=[('examples',
|
data_files=[('examples',
|
||||||
["examples/zuliprc",
|
["zulip/examples/zuliprc",
|
||||||
"examples/create-user",
|
"zulip/examples/create-user",
|
||||||
"examples/edit-message",
|
"zulip/examples/edit-message",
|
||||||
"examples/get-presence",
|
"zulip/examples/get-presence",
|
||||||
"examples/get-public-streams",
|
"zulip/examples/get-public-streams",
|
||||||
"examples/list-members",
|
"zulip/examples/list-members",
|
||||||
"examples/list-subscriptions",
|
"zulip/examples/list-subscriptions",
|
||||||
"examples/print-events",
|
"zulip/examples/print-events",
|
||||||
"examples/print-messages",
|
"zulip/examples/print-messages",
|
||||||
"examples/recent-messages",
|
"zulip/examples/recent-messages",
|
||||||
"examples/send-message",
|
"zulip/examples/send-message",
|
||||||
"examples/subscribe",
|
"zulip/examples/subscribe",
|
||||||
"examples/unsubscribe",
|
"zulip/examples/unsubscribe",
|
||||||
])] + list(recur_expand('share/zulip', 'integrations')),
|
])] + list(recur_expand('share/zulip', 'integrations')),
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
|
|
@ -612,7 +612,7 @@ class Client(object):
|
||||||
def send_message(self, message_data):
|
def send_message(self, message_data):
|
||||||
# type: (Dict[str, Any]) -> Dict[str, Any]
|
# type: (Dict[str, Any]) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/send-message for example usage.
|
See examples/send-message for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
url='messages',
|
url='messages',
|
||||||
|
@ -622,7 +622,7 @@ class Client(object):
|
||||||
def upload_file(self, file):
|
def upload_file(self, file):
|
||||||
# type: (IO) -> Dict[str, Any]
|
# type: (IO) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/upload-file for example usage.
|
See examples/upload-file for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
url='user_uploads',
|
url='user_uploads',
|
||||||
|
@ -632,7 +632,7 @@ class Client(object):
|
||||||
def update_message(self, message_data):
|
def update_message(self, message_data):
|
||||||
# type: (Dict[str, Any]) -> Dict[str, Any]
|
# type: (Dict[str, Any]) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/edit-message for example usage.
|
See examples/edit-message for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
url='messages/%d' % (message_data['message_id'],),
|
url='messages/%d' % (message_data['message_id'],),
|
||||||
|
@ -728,7 +728,7 @@ class Client(object):
|
||||||
def get_streams(self, **request):
|
def get_streams(self, **request):
|
||||||
# type: (**Any) -> Dict[str, Any]
|
# type: (**Any) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/get-public-streams for example usage.
|
See examples/get-public-streams for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
url='streams',
|
url='streams',
|
||||||
|
@ -739,7 +739,7 @@ class Client(object):
|
||||||
def get_members(self, request=None):
|
def get_members(self, request=None):
|
||||||
# type: (Dict[str, Any]) -> Dict[str, Any]
|
# type: (Dict[str, Any]) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/list-members for example usage.
|
See examples/list-members for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
url='users',
|
url='users',
|
||||||
|
@ -750,7 +750,7 @@ class Client(object):
|
||||||
def list_subscriptions(self, request=None):
|
def list_subscriptions(self, request=None):
|
||||||
# type: (Dict[str, Any]) -> Dict[str, Any]
|
# type: (Dict[str, Any]) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/list-subscriptions for example usage.
|
See examples/list-subscriptions for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
url='users/me/subscriptions',
|
url='users/me/subscriptions',
|
||||||
|
@ -761,7 +761,7 @@ class Client(object):
|
||||||
def add_subscriptions(self, streams, **kwargs):
|
def add_subscriptions(self, streams, **kwargs):
|
||||||
# type: (Iterable[Dict[str, Any]], **Any) -> Dict[str, Any]
|
# type: (Iterable[Dict[str, Any]], **Any) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/subscribe for example usage.
|
See examples/subscribe for example usage.
|
||||||
'''
|
'''
|
||||||
request = dict(
|
request = dict(
|
||||||
subscriptions=streams,
|
subscriptions=streams,
|
||||||
|
@ -776,7 +776,7 @@ class Client(object):
|
||||||
def remove_subscriptions(self, streams):
|
def remove_subscriptions(self, streams):
|
||||||
# type: (Iterable[str]) -> Dict[str, Any]
|
# type: (Iterable[str]) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/unsubscribe for example usage.
|
See examples/unsubscribe for example usage.
|
||||||
'''
|
'''
|
||||||
request = dict(delete=streams)
|
request = dict(delete=streams)
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
|
@ -832,7 +832,7 @@ class Client(object):
|
||||||
def create_user(self, request=None):
|
def create_user(self, request=None):
|
||||||
# type: (Dict[str, Any]) -> Dict[str, Any]
|
# type: (Dict[str, Any]) -> Dict[str, Any]
|
||||||
'''
|
'''
|
||||||
See api/examples/create-user for example usage.
|
See examples/create-user for example usage.
|
||||||
'''
|
'''
|
||||||
return self.call_endpoint(
|
return self.call_endpoint(
|
||||||
method='POST',
|
method='POST',
|
||||||
|
|
Loading…
Reference in a new issue