zulip: Move examples to zulip/examples.
This commit is contained in:
parent
2f62507987
commit
2f044b44bd
|
@ -1,11 +1,11 @@
|
|||
recursive-include integrations *
|
||||
include README.md
|
||||
include examples/zuliprc
|
||||
include examples/send-message
|
||||
include examples/subscribe
|
||||
include examples/get-public-streams
|
||||
include examples/unsubscribe
|
||||
include examples/list-members
|
||||
include examples/list-subscriptions
|
||||
include examples/print-messages
|
||||
include examples/recent-messages
|
||||
include zulip/examples/zuliprc
|
||||
include zulip/examples/send-message
|
||||
include zulip/examples/subscribe
|
||||
include zulip/examples/get-public-streams
|
||||
include zulip/examples/unsubscribe
|
||||
include zulip/examples/list-members
|
||||
include zulip/examples/list-subscriptions
|
||||
include zulip/examples/print-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.
|
||||
|
||||
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
|
||||
API bindings will automatically read it in. The format of the config
|
||||
|
|
|
@ -42,19 +42,19 @@ package_info = dict(
|
|||
],
|
||||
url='https://www.zulip.org/',
|
||||
data_files=[('examples',
|
||||
["examples/zuliprc",
|
||||
"examples/create-user",
|
||||
"examples/edit-message",
|
||||
"examples/get-presence",
|
||||
"examples/get-public-streams",
|
||||
"examples/list-members",
|
||||
"examples/list-subscriptions",
|
||||
"examples/print-events",
|
||||
"examples/print-messages",
|
||||
"examples/recent-messages",
|
||||
"examples/send-message",
|
||||
"examples/subscribe",
|
||||
"examples/unsubscribe",
|
||||
["zulip/examples/zuliprc",
|
||||
"zulip/examples/create-user",
|
||||
"zulip/examples/edit-message",
|
||||
"zulip/examples/get-presence",
|
||||
"zulip/examples/get-public-streams",
|
||||
"zulip/examples/list-members",
|
||||
"zulip/examples/list-subscriptions",
|
||||
"zulip/examples/print-events",
|
||||
"zulip/examples/print-messages",
|
||||
"zulip/examples/recent-messages",
|
||||
"zulip/examples/send-message",
|
||||
"zulip/examples/subscribe",
|
||||
"zulip/examples/unsubscribe",
|
||||
])] + list(recur_expand('share/zulip', 'integrations')),
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
|
|
|
@ -612,7 +612,7 @@ class Client(object):
|
|||
def send_message(self, message_data):
|
||||
# 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(
|
||||
url='messages',
|
||||
|
@ -622,7 +622,7 @@ class Client(object):
|
|||
def upload_file(self, file):
|
||||
# type: (IO) -> Dict[str, Any]
|
||||
'''
|
||||
See api/examples/upload-file for example usage.
|
||||
See examples/upload-file for example usage.
|
||||
'''
|
||||
return self.call_endpoint(
|
||||
url='user_uploads',
|
||||
|
@ -632,7 +632,7 @@ class Client(object):
|
|||
def update_message(self, message_data):
|
||||
# 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(
|
||||
url='messages/%d' % (message_data['message_id'],),
|
||||
|
@ -728,7 +728,7 @@ class Client(object):
|
|||
def get_streams(self, **request):
|
||||
# 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(
|
||||
url='streams',
|
||||
|
@ -739,7 +739,7 @@ class Client(object):
|
|||
def get_members(self, request=None):
|
||||
# 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(
|
||||
url='users',
|
||||
|
@ -750,7 +750,7 @@ class Client(object):
|
|||
def list_subscriptions(self, request=None):
|
||||
# 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(
|
||||
url='users/me/subscriptions',
|
||||
|
@ -761,7 +761,7 @@ class Client(object):
|
|||
def add_subscriptions(self, streams, **kwargs):
|
||||
# type: (Iterable[Dict[str, Any]], **Any) -> Dict[str, Any]
|
||||
'''
|
||||
See api/examples/subscribe for example usage.
|
||||
See examples/subscribe for example usage.
|
||||
'''
|
||||
request = dict(
|
||||
subscriptions=streams,
|
||||
|
@ -776,7 +776,7 @@ class Client(object):
|
|||
def remove_subscriptions(self, streams):
|
||||
# type: (Iterable[str]) -> Dict[str, Any]
|
||||
'''
|
||||
See api/examples/unsubscribe for example usage.
|
||||
See examples/unsubscribe for example usage.
|
||||
'''
|
||||
request = dict(delete=streams)
|
||||
return self.call_endpoint(
|
||||
|
@ -832,7 +832,7 @@ class Client(object):
|
|||
def create_user(self, request=None):
|
||||
# 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(
|
||||
method='POST',
|
||||
|
|
Loading…
Reference in a new issue