python-zulip-api/examples
Steve Howell 14ee40bf52 Simplify, document, and fix the API code.
We used to create endpoints with Client._register.

Now we now have explicit methods for the endpoints.

This allows us to add docstrings and stricter mypy annotations.

This fix also introduces a call_endpoint() method that avoids
the need for manually building urls with API_VERSTRING when you
know the URL pattern of the endpoint you want to hit (and when
the API doesn't have a convenient wrapper).

I fixed a bug with create_users where it now uses PUT instead
of POST.

I also removed client.export(), which was just broken.

I had to change recent-messages and zulip-export, which were
using client.do_api_query and Client._register.

Now it's easier to just call client.call_endpoint() for
situations where our API doesn't have convenient wrappers,
so that's what I did with those scripts.
2016-12-21 11:22:42 -08:00
..
create-user api: remove use of zulip.com domain in API bindings. 2016-12-15 09:35:37 -08:00
edit-message Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
get-public-streams Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
list-members Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
list-subscriptions Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
print-events Annotate API scripts. 2016-10-15 22:36:10 -07:00
print-messages Annotate API scripts. 2016-10-15 22:36:10 -07:00
recent-messages Simplify, document, and fix the API code. 2016-12-21 11:22:42 -08:00
send-message Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
subscribe Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
unsubscribe Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
zuliprc Rename ~/.humbugrc to ~/.zuliprc. 2013-08-08 10:22:31 -04:00