Commit graph

18 commits

Author SHA1 Message Date
Joe Cabrera
a0fec2f004 pep8 finished 2014-07-26 11:48:36 -04:00
Remi Rampin
9bf83fd933 Don't mask TwythonStreamer exceptions
Exceptions in handlers or on_success which subclass ValueError would
previously be caught and reported as a JSON decoding problem, and
on_error() would be called (with status_code=200).
2013-10-09 14:39:45 -04:00
Mike Helmick
99067c3e6f Fixes #254 and forgot to def chunk_size 2013-09-25 13:02:52 -04:00
Mike Helmick
f6d458e758 Fixes #230 2013-09-25 12:58:40 -04:00
Mike Helmick
8efa00e9f3 Fix docstring in types.py
[ci skip]
2013-07-18 23:33:10 -04:00
Mike Helmick
acdf73a04e More tests, coverage, and excluding lines from being covered
There are some lines that will never be hit in tests, excluding those
from being covered!
2013-06-27 22:37:02 -04:00
Mike Helmick
26ef7b47bf client_args to modify the request 2013-06-21 18:39:45 -04:00
Oleg Anashkin
50cee5ede8 Combine two ifs into a single line 2013-06-19 17:43:45 -07:00
Oleg Anashkin
009779dda0 Refactor message handling to be more flexible
New parameter `handlers` has a list of message types for which
corresponding handlers should be called. For example, for message types
['delete', 'limit', 'disconnect'] the handlers on_delete, on_limit,
on_disconnect will be invoked if the streamed message has the
corresponding attribute. If the handler returns True then more handlers
might be invoked, otherwise message processing stops. Before all
handlers are called, special on_success handler is invoked with the same
logic: continue message handling if True is returned.

This approach maintains backwards compatibility by not breaking any
existing behaviors.
2013-06-19 13:15:52 -07:00
Mike Helmick
7cab9d5dd1 Attempting to exclude lines that we can't necessarily hit in tests, added a test, fixed function name
update_profile_background_image has been in endpoints.py twice for a
bit, my bad.

Using update_profile_banner_image for the function name to update
profile banner image (that's what it was called previously)
2013-06-12 10:54:28 -04:00
Mike Helmick
124dc1b969 File coding, file description ALL THE THINGS
[ci skip]
2013-06-07 20:54:23 -04:00
Mike Helmick
ff7e3fab94 Updating a lot of docstrings, EndpointMixin replaces api_table dict
[ci skip]
2013-06-06 13:40:39 -04:00
Mike Helmick
f879094ea1 Update stream example, update AUTHORS for future example fix
Remove tests that usually caused Travis to fail
Made it clear that Authenticaiton IS required for Streaming in the
docstring
2013-05-29 11:41:30 -04:00
Mike Helmick
64b1349993 Python 3 compat 2013-05-29 11:41:03 -04:00
Mike Helmick
c8b1202880 Added disconnect to TwythonStreamer, more tests, update example
* Stream and Twython core tests
* Import TwythonStreamError from twython

See more in 2.10.1 section of HISTORY.rst
2013-05-29 11:41:03 -04:00
Mike Helmick
cea0852a42 Updating file structure and HISTORY.rst 2013-05-03 17:33:17 -04:00
Ryan McGrath
850c1011d1 Breaking down package structure a bit more 2009-12-17 03:19:42 -05:00
Ryan McGrath
a3edbb2348 New package structure; twython is now separated out into core/oauth/streaming. To maintain compatibility with older Twython versions, simply import twython like: 'import twython.core as twython' - this will allow for easier oauth/streaming development, and should hopefully fix a lot of the installation issues people kept running into with easy_install 2009-12-17 03:05:39 -05:00