Commit graph

258 commits

Author SHA1 Message Date
Kyle Kelley
37fc3e1aaa Coerce elements to strings as fallback 2013-09-05 20:45:53 -05:00
bool.dev
feac105c85 Fixed a docstring typo in get_authentication_tokens. 2013-08-30 02:16:46 +05:30
Jim Rybarski
79e2cfa78f #255 Change GET to POST for lookup_user 2013-08-23 03:47:22 -05:00
Jim Rybarski
d4f104b8a6 fixed problem where cursor stops after 10k results 2013-08-16 13:04:04 -05:00
Mike Helmick
3f69928bf6 Merge pull request #240 from jackboot7/master
Added a new param to the Twython __init__ that lets you select the authe...
2013-07-23 21:20:39 -07:00
Mike Helmick
06f5425724 Fixes #244 2013-07-20 17:46:13 -04:00
Mike Helmick
dd3727c6f5 Fixes #243 2013-07-20 17:22:07 -04:00
Mike Helmick
52e025a6a2 Merge pull request #241 from ryanmcgrath/dev/cursor
WIP: General cursor (generator) like object for Twython functions, fixes #238
2013-07-20 12:01:29 -07:00
Mike Helmick
10317bac23 Accomedate all endpoints that can be paginated with iter_mode and if needed, iter_key 2013-07-20 14:28:49 -04:00
Mike Helmick
0fa9b631c1 Update documentation for cursor example
[ci skip]
2013-07-18 23:42:52 -04:00
Mike Helmick
8efa00e9f3 Fix docstring in types.py
[ci skip]
2013-07-18 23:33:10 -04:00
Mike Helmick
2dc15b7030 Fix generator test, remove search_gen from coverage 2013-07-18 20:43:02 -04:00
Mike Helmick
c7af673ad6 Remove print 😊 2013-07-18 20:32:58 -04:00
Mike Helmick
ebd5cd47dd General cursor (generator) like object for Twython functions
* If the endpoint has an iter_mode, the function is able to be used in
Twython.cursor

* Deprecate Twython.search_gen

Fixes #238
2013-07-18 20:31:56 -04:00
Luis Alberto Santana
1f9afbe02c Added a new param to the Twython __init__ that lets you select the authentication endpoint
for your application.
2013-07-17 15:52:38 -04:30
Mike Helmick
f77d9eb523 If bad tokens for oauth 2 obtain token, 'access_token' is never in the dict 2013-06-27 22:47:07 -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
3c637ddc7d Tests and documentation 2013-06-27 19:20:43 -04:00
Mike Helmick
173adee4a6 HTML for tweet
fixes #224
2013-06-25 21:58:10 -04:00
Mike Helmick
6cab7bf95d Fix Python 3 compat
[ci skip]
2013-06-25 16:31:12 -04:00
Mike Helmick
e786e59050 Merge pull request #232 from hades/master
wrap requests exceptions in TwythonError class
2013-06-25 12:53:44 -07:00
Edward Hades
4fb410fdeb wrap requests exceptions in TwythonError class 2013-06-25 20:19:33 +02: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
2af2fc00de Support for Desktop/Mobile apps, remove README.md, helpers in docs for people with non-web apps
Removed README.md, rST can highlight syntax too I found out! :)
2013-06-13 16:47:43 -04:00
Mike Helmick
756eb9060e Update docs, add functionality to get_lastfunction_header per @devdave 2013-06-13 13:31:32 -04: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
672c8db77e Remove sphinx themes from requirements, remove Import error
We don't support Python 2.5 and after 2.6 parse_qsl is available in
urlparse

[ci skip]
2013-06-11 19:11:52 -04:00
Mike Helmick
478c139af2 Coverage, tests, secure ACCESS_TOKEN, update HISTORY 2013-06-11 17:12:34 -04:00
Mike Helmick
2f5f496ead More test coverage 2013-06-11 15:00:39 -04:00
Mike Helmick
80c428992b Empty dict if client_args is None
I should run local tests before I commit :/
2013-06-11 10:48:46 -04:00
Mike Helmick
d0191895d5 Copy of client args, and restrict travis to only master (still build for PR though)
I'm dumb.
2013-06-11 10:18:25 -04:00
Mike Helmick
a0aae4687d Introduce client_args
client_args allow for users to manipulate the request without our init
being cluttered up with keyword args

[ci skip]
2013-06-10 16:35:52 -04:00
Mike Helmick
f6040fe275 Fixing code (errors from tests), update HISTORY
[ci skip]
2013-06-08 16:52:15 -04:00
Mike Helmick
124dc1b969 File coding, file description ALL THE THINGS
[ci skip]
2013-06-07 20:54:23 -04:00
Mike Helmick
8559a1f1ce OAuth 2 support :)
[ci skip]
2013-06-07 20:12:52 -04:00
Mike Helmick
31efb0c7cf Fix verify_credentials definition name
[ci skip]
2013-06-07 15:27:10 -04:00
Mike Helmick
ec2bd7d686 Automatically join kwargs passed as lists into comma-separated string
[ci skip]
2013-06-06 13:41:44 -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
47e1b7c158 3.0.0
## 3.0.0

- Changed ``twython/twython.py`` to ``twython/api.py`` in attempt to
make structure look a little neater
- Removed all camelCase function access (anything like
``getHomeTimeline`` is now ``get_home_timeline``) Fixes #199
- Removed ``shorten_url``. With the ``requests`` library, shortening a
URL on your own is simple enough
- ``twitter_token``, ``twitter_secret`` and ``callback_url`` are no
longer passed to ``Twython.__init__`` Fixes #185
    - ``twitter_token`` and ``twitter_secret`` have been replaced with
``app_key`` and ``app_secret`` respectively
    - ``callback_url`` is now passed through
``Twython.get_authentication_tokens``

[ci skip]
2013-05-30 18:16: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
894e94a4cd 2.10.1
- More test coverage!
- Fix ``search_gen``
- Fixed ``get_lastfunction_header`` to actually do what its docstring
says, returns ``None`` if header is not found
- Updated some internal API code, ``__init__`` didn't need to have
``self.auth`` and ``self.headers`` because they were never used
anywhere else but the ``__init__``
2013-05-29 11:41:03 -04:00
devdave
b0d801b7bb Added numeric_types 2013-05-28 20:05:04 -05:00
devdave
a246743698 Added compat, numeric_types as allowed param type. 2013-05-28 20:03:20 -05:00
devdave
11acb49295 Allow for long's as well as ints for request params
_params['max_id']
330122291755220993L

type(_params['max_id'])
<type 'long'>

isinstance(_params['max_id'], int)
False

isinstance(_params['max_id'], (long,int))
True
2013-05-28 18:33:37 -05:00
Mike Helmick
050835e660 construct_api_url params as kwarg
Sometimes params isn't doesn't have to be passed
[ci skip]
2013-05-21 15:20:17 -04:00
Mike Helmick
126305d93d Revert removing unicode2utf8 and encode staticmethods
[ci skip]
2013-05-21 12:52:17 -04:00