Commit graph

157 commits

Author SHA1 Message Date
Kartik Srivastava
d2b9976015 api: Rename get_members to get_users. 2020-05-14 11:36:17 -07:00
Eeshan Garg
1dac75f979 pypi: Release version 0.7.0. 2020-04-20 23:23:58 -02:30
Anders Kaseorg
17cf26aa1f cleanup: Move line breaks before binary operators.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
2f6623bbc4 cleanup: Remove unused imports.
Generated by autoflake.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
5428c5f296 typing: Convert function type annotations to Python 3 style.
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and two fixes for use-before-define
issues:

-    def set_zulip_client(self, zulipToJabberClient: ZulipToJabberBot) -> None:
+    def set_zulip_client(self, zulipToJabberClient: 'ZulipToJabberBot') -> None:

-def init_from_options(options: Any, client: Optional[str] = None) -> Client:
+def init_from_options(options: Any, client: Optional[str] = None) -> 'Client':

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
ddb05ea7eb add_default_arguments: Correct custom_error_handling type annotation.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Kartik Srivastava
f9d6c085a1 api: Implement POST /default_streams api endpoint. 2020-04-18 15:05:53 -07:00
akashaviator
ef730b2c1b api: Implement GET /messages/matches_narrow endpoint. 2020-04-18 15:05:36 -07:00
Anders Kaseorg
e30b3b094b Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
Kartik Srivastava
04e43b95bc api: Implement /users/{user_id}/reactivate api endpoint. 2020-04-15 17:18:00 -07:00
akashaviator
59b025d2e4 api: Implement PATCH /users/{user_id} endpoint. 2020-04-09 17:17:59 -07:00
Kartik Srivastava
ed706c24ce api: Implement GET /realm/presence endpoint. 2020-04-09 17:17:29 -07:00
Kartik Srivastava
8b0fa6bfee
api: Implement GET /attachments endpoint. 2020-04-07 16:44:49 -07:00
Kartik Srivastava
6dd52439bf
api: Implement DELETE /users/{user_id} api endpoint. 2020-04-07 16:12:59 -07:00
Kartik Srivastava
8d7eb0fea3
api: Refactor get_user_by_id to take keyword arguments.
This refactors get_user_by_id to take arguments like
`include_custom_profile_fields = True` instead of
{include_custom_profile_fields: True}.
2020-04-07 16:12:11 -07:00
rht
d7c52c9a74 zulip/zulip/__init__.py: Remove shebang and add version assertion. 2020-04-05 07:28:13 -04:00
rht
439c096eac Remove all remaining six imports. 2020-04-03 08:18:08 -04:00
rht
f34540d26d Add explicit python3 shebang to __init__.py. 2020-04-03 08:18:08 -04:00
rht
4600ce59a3 Remove all remaining from __future__ imports. 2020-04-03 08:18:08 -04:00
rht
204871b518 Finish the remaining migration of shebang to python3. 2020-04-03 08:18:08 -04:00
rht
d174e589bf examples/upload-file: Use python3-specific import of StringIO. 2020-04-02 09:56:59 -04:00
rht
87198501dc examples: Remove from __future__ imports. 2020-04-02 09:56:59 -04:00
rht
e5144b8503 examples: Switch to python3. 2020-04-02 09:56:59 -04:00
Eeshan Garg
ce73dab121 pypi: Release version 0.6.4. 2020-03-26 19:52:46 -02:30
akashaviator
2cf49788fd api: Implement GET users/{id} endpoint. 2020-03-25 17:00:52 -07:00
rht
8a74f576a3 python: Remove per-file copyright notices.
These notices are redundant and obscure what are often very short
example scripts.
2020-03-23 12:52:52 -07:00
Mateusz Mandera
8fc5b777db api: Fix undefined variable reference from previous commit. 2020-03-14 11:36:34 -07:00
orientor
056963bedd api: Add delay_cap as class variable of CountingBackoff class. 2020-03-05 13:33:50 -08:00
Steve Howell
dd37e27b36 docstring: Use user_ids for typing endpoint. 2020-02-23 07:45:33 -05:00
Eeshan Garg
957b5e7ad8 pypi: Release version 0.6.3. 2019-12-16 11:48:56 -03:30
Eeshan Garg
efcc89da9d pypi: Release version 0.6.2. 2019-12-14 16:38:48 -03:30
Puneeth Chaganti
63bc9b8a4f zulip: Use distro.linux_distribution instead of platform
Python 3.8 removes `platform.linux_distribution` and `distro` is the
recommended replacement to use for this function.
2019-11-01 17:49:49 -07:00
Anders Kaseorg
567d6ebc25 Client.get_user_presence: Fix blatantly incorrect type annotation.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-07 16:53:42 -07:00
Eeshan Garg
e5bcd095fd pypi: Release version 0.6.1. 2019-07-14 21:17:53 -02:30
neiljp (Neil Pilgrim)
c2e5b14034 api: Add UnrecoverableNetworkError Exception & use in do_api_query.
This replaces one case where the base ZulipError was raised, and another
where the original exception was re-raised.

This method, and so all API calls, should now only fail via raising this
Exception or by a non-'success' result in the return value dict; this
should avoid leaking any implementation detail and clarify expectations
in user code.
2019-03-29 14:12:26 -07:00
Eeshan Garg
accfa8ddaf pypi: Release version 0.6.0. 2019-03-19 19:43:23 -02:30
Eeshan Garg
3a2e85c2b1 zulip: Fix argument name in add/remove reaction example comment.
The actual argument is supposed to be named `reaction_type`, not
`emoji_type`.
2019-03-02 19:12:44 -03:30
Eeshan Garg
d43b9328f0 pypi: Release version 0.5.9. 2019-02-17 02:49:27 -03:30
neiljp (Neil Pilgrim)
47f9b103ab api: Fix add_reaction method to pass reaction_data.
Also correct the example usage text.
2019-02-16 03:29:24 -08:00
Sivagiri Visakan
26c85bb9ed zulip/examples: Add a script to get complete history of a narrow.
Fixes #476.
2019-01-28 22:49:47 -03:30
Eeshan Garg
9931de2c6b pypi: Release version 0.5.8. 2019-01-22 22:35:37 -03:30
Eeshan Garg
ed6c797d19 pypi: Release version 0.5.7. 2019-01-16 20:50:46 -03:30
neiljp (Neil Pilgrim)
eb0e150a71 api: Add Optional timeout parameter to deregister. 2019-01-14 19:24:08 -08:00
neiljp (Neil Pilgrim)
f858e48468 api: Add timeout parameter to do_api_query and call_endpoint. 2019-01-14 19:24:08 -08:00
Roger Souza
3f2b11c345 api: Implement POST /realm/emoji<emoji_name>. 2018-12-20 17:49:31 -03:30
Eeshan Garg
d478c91965 pypi: Release version 0.5.6. 2018-12-17 17:07:32 -03:30
Eeshan Garg
09deda9466 pypi: Release version 0.5.5. 2018-09-25 22:36:57 -02:30
Eeshan Garg
048fa79a7c pypi: Release version 0.5.4.
Starting now, we now also have a CHANGELOG to record major changes
to the zulip package.
2018-08-31 17:25:55 -02:30
Yago González
256a17fa94 api: Rename "get_presence" to "get_user_presence".
Given that this method fetches the presence status for a single user,
the "get_presence" name should be reserved for the endpoint that gets
the presence for all users.
2018-08-28 11:28:35 -07:00
Roman Godov
d02dbbcf75 api: Implement GET /user_groups. 2018-08-27 18:39:27 -02:30