Commit graph

191 commits

Author SHA1 Message Date
Yago González
49e919ac3a api: Implement DELETE /messages/<message_id>/reactions. 2018-08-08 17:23:21 -07:00
Yago González
0ca25af06e api: Implement POST /user_groups/create. 2018-08-08 17:22:35 -07:00
Yago González
2f463e2a88 api: Implement POST /users/me/presence. 2018-08-08 17:22:05 -07:00
Tim Abbott
6d8ac7c3c0 api: Check for BAD_EVENT_QUEUE_ID code.
This is the best way to do this check, since it isn't subject to i18n
modifying the strings.  The server feature was originally introduced
in zulip/zulip commit 709c3b50fcba333740bb337bac69a801dbbdc4ee.

Since it's only 1 year old and the outcome is quite bad if this check
weren't present, we preserve support for older servers.
2018-08-02 15:59:52 -07:00
Eeshan Garg
1127f973aa pypi: Release version 0.5.2. 2018-07-26 21:19:12 -02:30
Yago González
91135fca09 api: Implement POST /users/me/subscriptions/properties. 2018-07-13 01:10:58 +05:30
Yago González
04d6c58cc4 api: Add example for managing alert words.
This example makes use of get_alert_words, add_alert_words and
remove_alert_words, three methods that interact with the
/users/me/alert_words REST API endpoint.
2018-07-12 16:40:58 -02:30
Yago González
3070106365 api: Implement DELETE /users/me/alert_words. 2018-07-12 16:40:58 -02:30
Yago González
c661d78b63 api: Implement POST /users/me/alert_words. 2018-07-12 16:40:58 -02:30
Yago González
c057e0df14 api: Implement GET /users/me/alert_words. 2018-07-12 16:40:58 -02:30
Yago González
f6646f9cba api: Implement PATCH /users/me/subscriptions/muted_topics. 2018-07-09 15:05:04 -02:30
Yago González
2da5fb3484 api: Rename update-flags to update-message-flags.
Followup for #449.
2018-07-04 18:14:48 +02:00
Yago González
4d9b3226fd api: Implement GET /realm/emoji. 2018-07-03 20:01:56 -02:30
Yago González
a96c3f0db0 api: Implement POST /messages/flags. 2018-07-03 11:03:26 -07:00
Eeshan Garg
c2fdd547f7 PyPI: Release 0.5.1. 2018-07-01 12:05:59 -02:30
Shubham Dhama
918e63a220 zulip_bots: Fix get_storage request arguments in StateHandler. 2018-07-01 08:01:18 -04:00
Yago González
f8fd7b6fbf api: Implement GET /messages/<message_id>/history. 2018-06-28 20:26:06 -02:30
Yago González
2da831bbe1 api: Fix mypy annotations for delete_message. 2018-06-28 20:26:06 -02:30
Yago González
e6972bcbb9 api: Add extra arguments to get-messages example. 2018-06-26 19:46:22 -02:30
Yago González
0e39ca5236 api: Remove recent-messages example.
The GET /messages action has been recently implemented into our
bindings. Therefore this example has been superseded by get-messages,
which is capable of fetch messages in a more fine-grained way.
2018-06-26 19:46:22 -02:30
Yago González
38f3e1a9f5 api: Implement GET /messages/<message_id>. 2018-06-26 19:42:49 -02:30
Yago González
e2f379675b api: Implement DELETE /messages/<message_id>. 2018-06-26 19:40:27 -02:30
Yago González
005829192e api: Implement PATCH /streams/<stream_id>. 2018-06-26 19:38:44 -02:30
Yago González
36566c26c1 api: Implement GET /messages. 2018-06-21 15:51:53 -02:30
Eeshan Garg
c636a5ac49 pypi: Release 0.5.0. 2018-06-07 12:05:18 -02:30
Eeshan Garg
00f22e175c pypi: Release 0.4.7. 2018-05-21 20:02:43 -02:30
Yago González
e9a518e93e api: Warn when SSL/TLS validation is disabled. 2018-05-15 08:17:35 -07:00
Yago González
d85792524e api: Allow disabling TLS verification via env vars. 2018-05-15 08:17:35 -07:00
Yago González
285464a367 api: Set required fields in the examples.
Now all the API examples have their corresponding arguments set as
required when they have to be present for the example to run.
2018-05-15 07:40:48 -07:00
Yago González
cb171409c5 api: Fix edit-message example.
The message ID necessarily has to be an integer, and if no casting is
made it was being considered a string, causing problems when running
the example.
2018-05-15 07:40:48 -07:00
Yago González
292a3bc067 api: Add execution permissions to welcome-message. 2018-05-14 11:04:57 -07:00
Yago González
817636cbc6 api: Implement /users/me/<stream_id>/topics. 2018-05-14 11:04:57 -07:00
neiljp (Neil Pilgrim)
55d75b11bc packaging: Add py.typed marker file & install in setup.py.
This follows the provisional new PEP 561:
https://www.python.org/dev/peps/pep-0561/.
2018-05-02 12:13:26 -07:00
Eeshan Garg
f4bdb059db pypi: Release version 0.4.6.
This includes a critical bug fix for call_on_each_event.
2018-04-27 01:43:42 -02:30
Tim Abbott
d40328a311 api: Fix call_on_each_events handling of empty event_types.
The root issue here is that we had been using `None` as a way of
encoding `event_types` as being an argument to not pass to the server
in the API codebase, but the marshalling to send this over the wire
didn't handle that possibility correctly.

This was incorrectly "fixed" in
409bb58742; the root cause of the issue
was the refactor to the new approach for registering API endpoints.
2018-04-25 23:01:37 -07:00
Eeshan Garg
0f448579ab pypi: Release 0.4.5.
We just made a minor change to our Git integration, so that warranted
a new release so I could update the docs on the zulip/zulip repo.
2018-04-23 18:50:56 -02:30
Eeshan Garg
2d46445ab5 pypi: Release version 0.4.4.
This includes some important changes after the release of pip 10.
2018-04-16 17:05:27 -02:30
neiljp (Neil Pilgrim)
55aff6f64b mypy: Improve typing of bots & API; enforce no_implicit_optional. 2018-04-06 13:45:11 -04:00
Eeshan Garg
60e02ed979 pypi: Release version 0.4.3.
Making this release due to recent changes made to the Trello script.
2018-04-03 22:05:39 -02:30
neiljp (Neil Pilgrim)
0f29e9f71b mypy: Improve type annotations in Zulip API.
- Reduce use of Any, eg. in Callable parameters & narrow List;
- Use Optional where appropriate in more locations.
2018-03-31 15:45:54 -07:00
neiljp (Neil Pilgrim)
83b41a2e9e zulip: Amend default value of remove_subscriptions:principals to None.
Having a default parameter as '[]' may not be an issue with the current
implementation, but general practice is to default to None and assign
a default list subsequently.
2018-03-31 15:45:25 -07:00
Eeshan Garg
7e360c244c pypa: Release version 0.4.2. 2018-03-31 17:19:23 -02:30
amanagr
aa5df127ae API: Use session.headers.update method to add user-agent header.
Directly assigning session.headers overrides the default header
paramers and removes `{'Accept-Encoding': 'gzip, deflate'}` from
the headers.
2018-03-30 13:10:04 -07:00
Shivam Gera
fc1d134685 api: Use custom exceptions in API client.
This removes the use of RuntimeError, and replaces it with a custom
error class called ZulipError.  In a few places, we use a subclass to
make it easier for code to interact with the error type.
2018-02-16 11:33:18 -08:00
Eeshan Garg
f74c94ba04 pypi_packaging: Release version 0.4.1. 2018-02-07 01:03:49 -03:30
Eeshan Garg
67cdb6f8f0 zulip: Make a DELETE request in remove_subscriptions.
Previously, remove_subscriptions called the
PATCH /api/v1/users/me/subscriptions endpoint, which is more like
an ad-hoc endpoint for bulk adding/removing subscriptions for the
user that makes the request. However, making a DELETE request
allows an admin to pass in the `principals` argument to unsubscribe
other users from streams as well, which is more consistent with how
add_subscriptions works.
2018-01-12 07:29:06 -05:00
neiljp (Neil Pilgrim)
afee6d706f mypy: Assert Zulip.[api_key|email] are not None, satisfying use in Zephyr. 2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
d26e44ebb2 mypy: Add client_cert assertion & amend annotation in Zulip API. 2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
13bf6f7262 mypy: Add non-None session assertion in Zulip API. 2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
2a2c8ae25f API: Amend call_on_each_event error handling to not use .get().
mypy with strict-optional led to examination of res.get('result')
calls potentially raising TypeError ('error' in None).

Server code indicates this is safe, and other nearby code assumes
presence of fields in 'res' also.
2018-01-08 15:39:03 -05:00