tweepy.git
13 years agoMerge streaming improvements from robinhouston.
Josh Roesslein [Thu, 14 Apr 2011 05:50:43 +0000 (00:50 -0500)]
Merge streaming improvements from robinhouston.

13 years agoCode style fixup.
Josh Roesslein [Thu, 14 Apr 2011 05:34:16 +0000 (00:34 -0500)]
Code style fixup.

13 years agoAdd User Streams.
AlanBell [Wed, 30 Mar 2011 19:55:24 +0000 (12:55 -0700)]
Add User Streams.

13 years ago_read_loop really didn't seem right, but somehow kinda worked. It now works when...
AlanBell [Wed, 30 Mar 2011 19:52:49 +0000 (12:52 -0700)]
_read_loop really didn't seem right, but somehow kinda worked. It now works when pointed at user streams too.

13 years agoA five-second default timeout is pretty ridiculous for streaming
Robin Houston [Sat, 5 Mar 2011 16:16:39 +0000 (16:16 +0000)]
A five-second default timeout is pretty ridiculous for streaming
searches, where Twitter will take longer than five seconds even to
send a response header.

My preferred default would be no timeout at all, but if we are to
have one then five minutes seems more reasonable than five seconds.

13 years agoApply the auth before connecting, otherwise it will fail on reconnection
Robin Houston [Sat, 5 Mar 2011 16:15:19 +0000 (16:15 +0000)]
Apply the auth before connecting, otherwise it will fail on reconnection
when using OAuth (because the nonce has been used before, and the timestamp
is no longer correct).

13 years agoChange tabs to spaces, for consistency
Robin Houston [Sat, 5 Mar 2011 15:45:55 +0000 (15:45 +0000)]
Change tabs to spaces, for consistency

13 years agoImprove the options handling in the streaming.Stream class, so that false values...
Robin Houston [Sat, 5 Mar 2011 15:41:16 +0000 (15:41 +0000)]
Improve the options handling in the streaming.Stream class, so that false values can be used. (In particular I want to be able to pass timeout=None, but one might also reasonably want to pass zero for some of the other options.)

13 years agoFixed default status parser to use user model from the model factory. This enables...
Pascal Jürgens [Fri, 17 Dec 2010 10:09:44 +0000 (18:09 +0800)]
Fixed default status parser to use user model from the model factory. This enables use of one's own user models.

13 years agoAdd support for related_result
Aaron Swartz [Sat, 5 Feb 2011 05:32:25 +0000 (23:32 -0600)]
Add support for related_result

13 years agoMerge branch 'master' of github.com:joshthecoder/tweepy
Josh Roesslein [Sat, 5 Feb 2011 05:05:43 +0000 (23:05 -0600)]
Merge branch 'master' of github.com:joshthecoder/tweepy

13 years agoadded support for count parameter in filter method
w43L [Wed, 1 Dec 2010 02:22:35 +0000 (10:22 +0800)]
added support for count parameter in filter method

13 years agoadded information about twitters discontinued basic auth support to docs
Johannes Faigle [Fri, 26 Nov 2010 13:16:39 +0000 (21:16 +0800)]
added information about twitters discontinued basic auth support to docs

13 years agoadded information about twitters discontinued basic auth support to docs
Johannes Faigle [Fri, 26 Nov 2010 13:16:39 +0000 (13:16 +0000)]
added information about twitters discontinued basic auth support to docs

13 years agoPropagate connection failure exceptions up through verify_credentials
Clay McClure [Thu, 30 Dec 2010 23:44:55 +0000 (07:44 +0800)]
Propagate connection failure exceptions up through verify_credentials

14 years agoInclude all parameters when signing request for OAuth.
Josh Roesslein [Mon, 18 Oct 2010 14:22:35 +0000 (09:22 -0500)]
Include all parameters when signing request for OAuth.

14 years agoFix an error in the Stream class.
Josh Roesslein [Mon, 18 Oct 2010 02:40:58 +0000 (21:40 -0500)]
Fix an error in the Stream class.

14 years agoFix up auth tutorial.
Josh Roesslein [Sun, 17 Oct 2010 04:34:20 +0000 (23:34 -0500)]
Fix up auth tutorial.

Closes #54

14 years agoAdd include_rts parameter to user_timeline().
Josh Roesslein [Sun, 17 Oct 2010 04:27:10 +0000 (23:27 -0500)]
Add include_rts parameter to user_timeline().

Closes #48

14 years agoUse unicode for Tweepy error messges.
Josh Roesslein [Sun, 17 Oct 2010 04:03:15 +0000 (23:03 -0500)]
Use unicode for Tweepy error messges.

Closes #38

14 years agoFix a bug in the cache code which would error when loading non-Model objects.
Josh Roesslein [Sun, 17 Oct 2010 02:58:56 +0000 (21:58 -0500)]
Fix a bug in the cache code which would error when loading non-Model objects.

14 years agoConsumer credentials must now be provided to run oauth tests.
Josh Roesslein [Sun, 10 Oct 2010 07:16:26 +0000 (02:16 -0500)]
Consumer credentials must now be provided to run oauth tests.

14 years agoMove tweepyshell script to tools folder.
Josh Roesslein [Sun, 10 Oct 2010 04:39:34 +0000 (23:39 -0500)]
Move tweepyshell script to tools folder.

14 years agoUpdate Contributors file.
Josh Roesslein [Sun, 10 Oct 2010 04:39:11 +0000 (23:39 -0500)]
Update Contributors file.

14 years agoOpen the correct type of HTTP Connection based on the scheme being used.
Josh Roesslein [Sun, 10 Oct 2010 04:06:28 +0000 (23:06 -0500)]
Open the correct type of HTTP Connection based on the scheme being used.

14 years agoRemove un-needed import and tiddy up some comments.
Josh Roesslein [Sun, 10 Oct 2010 04:03:19 +0000 (23:03 -0500)]
Remove un-needed import and tiddy up some comments.

14 years agoClean up the way we pull in stream options.
Josh Roesslein [Sun, 10 Oct 2010 04:01:30 +0000 (23:01 -0500)]
Clean up the way we pull in stream options.

Note: this may break some code that just passes this options
by position rather than keyword.

14 years agoAllow for secure streams and make sure to properly apply auth for OAuth.
Josh Roesslein [Sun, 10 Oct 2010 03:53:25 +0000 (22:53 -0500)]
Allow for secure streams and make sure to properly apply auth for OAuth.

14 years agoStream now accepts an authentication instance.
Josh Roesslein [Sun, 10 Oct 2010 03:39:38 +0000 (22:39 -0500)]
Stream now accepts an authentication instance.

It should now be possible to authenticate with
the streaming API by either using BasicAuthHandler or
OAuthHandler.

14 years agoNow push lat/lon with only two decimals after the digit, like Twitter wants
Sam Kaufman [Sun, 15 Aug 2010 20:37:00 +0000 (04:37 +0800)]
Now push lat/lon with only two decimals after the digit, like Twitter wants

14 years agoAdded filtering by locations to the streaming API.
Sam Kaufman [Wed, 16 Jun 2010 06:26:14 +0000 (14:26 +0800)]
Added filtering by locations to the streaming API.

14 years agomemcache cache
gilles [Fri, 10 Sep 2010 18:59:04 +0000 (02:59 +0800)]
memcache cache

14 years agoFix for null twitter json objects.
Jenny Loomis [Tue, 24 Aug 2010 17:55:25 +0000 (10:55 -0700)]
Fix for null twitter json objects.

Don't die while waiting for fix to twitter api issue 1823: http://code.google.com/p/twitter-api/issues/detail?id=1823

14 years agoChanged url.
Adam Miskiewicz [Fri, 21 May 2010 07:01:37 +0000 (15:01 +0800)]
Changed url.

14 years agoRuntime exception in listener no longer fails silently (Fixed issue #14).
Wayne Moore [Sun, 16 May 2010 08:45:14 +0000 (16:45 +0800)]
Runtime exception in listener no longer fails silently (Fixed issue #14).

14 years agoIgnore any arguments that are None.
Josh Roesslein [Wed, 16 Jun 2010 06:36:04 +0000 (01:36 -0500)]
Ignore any arguments that are None.

Fixes issues #33

14 years agoParser now sets source_url consistently.
Wayne Moore [Sun, 16 May 2010 08:46:03 +0000 (16:46 +0800)]
Parser now sets source_url consistently.

14 years agoTweepError was not imported in parsers.py, leading to "global name 'TweepError' is...
Guan Yang [Sun, 6 Jun 2010 18:21:34 +0000 (02:21 +0800)]
TweepError was not imported in parsers.py, leading to "global name 'TweepError' is not defined" errors

14 years agoFix for python 2.4. Release 1.7.1.
Joshua Roesslein [Tue, 25 May 2010 15:25:53 +0000 (10:25 -0500)]
Fix for python 2.4. Release 1.7.1.

14 years agoBump to version 1.7
Joshua Roesslein [Mon, 24 May 2010 03:50:36 +0000 (22:50 -0500)]
Bump to version 1.7

14 years agoRe-enable some tests.
Joshua Roesslein [Mon, 24 May 2010 03:47:30 +0000 (22:47 -0500)]
Re-enable some tests.

14 years agoDocumentation fix in oauth tutorial.
Joshua Roesslein [Mon, 24 May 2010 03:35:38 +0000 (22:35 -0500)]
Documentation fix in oauth tutorial.

14 years agoAdd additonal search() parameters supported by Twitter.
Joshua Roesslein [Mon, 24 May 2010 03:32:27 +0000 (22:32 -0500)]
Add additonal search() parameters supported by Twitter.

14 years agocatch exception for deleting _api model reference when pickling/ unpickling
Chris Kelly [Fri, 30 Apr 2010 02:24:42 +0000 (10:24 +0800)]
catch exception for deleting _api model reference when pickling/ unpickling

14 years agoFix an error in the cursor tutorial.
Joshua Roesslein [Fri, 23 Apr 2010 20:16:14 +0000 (15:16 -0500)]
Fix an error in the cursor tutorial.

Fixes issue #28

14 years agoUse 'per_page' instead of 'count' paramter for list_timeline() method.
Joshua Roesslein [Fri, 23 Apr 2010 20:09:30 +0000 (15:09 -0500)]
Use 'per_page' instead of 'count' paramter for list_timeline() method.

Fixes issue #27

14 years agoAdded friendships_incoming() and friendships_outgoing() methods.
Joshua Roesslein [Fri, 23 Apr 2010 19:58:36 +0000 (14:58 -0500)]
Added friendships_incoming() and friendships_outgoing() methods.

See dev.twitter.com documentation for more details.

14 years agoTrends methods are no longer part of the search API.
Joshua Roesslein [Fri, 23 Apr 2010 19:45:48 +0000 (14:45 -0500)]
Trends methods are no longer part of the search API.

14 years agoAdded reverse_geocode, nearby_places, and geo_id methods.
Kumar Appaiah [Sun, 18 Apr 2010 22:03:52 +0000 (17:03 -0500)]
Added reverse_geocode, nearby_places, and geo_id methods.

14 years agoAdded retweeted_by and retweeted_by_ids methods.
Joshua Roesslein [Sat, 17 Apr 2010 02:41:42 +0000 (21:41 -0500)]
Added retweeted_by and retweeted_by_ids methods.

14 years agoMerge 'jnr/master'
Joshua Roesslein [Sat, 3 Apr 2010 03:00:51 +0000 (22:00 -0500)]
Merge 'jnr/master'

14 years agoCouple of typos fixed.
James Rowe [Sat, 3 Apr 2010 02:09:42 +0000 (03:09 +0100)]
Couple of typos fixed.

14 years agoFix a recursion bug when calling API.verify_credentials()
Joshua Roesslein [Fri, 2 Apr 2010 21:00:12 +0000 (16:00 -0500)]
Fix a recursion bug when calling API.verify_credentials()

14 years agoFix an issue where 'user' parameter value was getting overridden.
Joshua Roesslein [Mon, 29 Mar 2010 14:45:42 +0000 (09:45 -0500)]
Fix an issue where 'user' parameter value was getting overridden.

This caused issues with lists_memberships() when trying to get memberships
of an user besides the authenticated one. We now only set 'user' parameter
to the authenticated user when no 'user' value is provided when calling
the API method.

14 years agotweepyshell: remove unused import
Gergely Imreh [Fri, 19 Mar 2010 14:57:41 +0000 (22:57 +0800)]
tweepyshell: remove unused import

14 years agoFIX: tweepyshell: ipython shell took original arguments
Gergely Imreh [Fri, 19 Mar 2010 14:53:24 +0000 (22:53 +0800)]
FIX: tweepyshell: ipython shell took original arguments

Previously the ipython shell kidnapped all tweepyshell input
arguments and interpreted as its own. Thus e.g. supplying
a username resulted in it trying to open a file with a name equal
to the username. This is not nice so let's put an end to it by
explicitly passing an empty arguments list.

14 years agoFIX: tests: tripple-quote error (closing quotes missing)
Gergely Imreh [Fri, 19 Mar 2010 05:00:04 +0000 (13:00 +0800)]
FIX: tests: tripple-quote error (closing quotes missing)

Placed the opening quotes to the right indentation level, and
re-added closing quotes to be able to run the tests.

14 years agoImplemented API.lookup_users()
Joshua Roesslein [Fri, 19 Mar 2010 03:38:57 +0000 (22:38 -0500)]
Implemented API.lookup_users()

This method allows you to perform a bulk lookup
of users by using their IDs or screen names.

For more info see http://apiwiki.twitter.com/Twitter-REST-API-Method:-users-lookup

14 years agoUpdate contributors and readme.
Joshua Roesslein [Fri, 19 Mar 2010 03:15:46 +0000 (22:15 -0500)]
Update contributors and readme.

14 years agotweepyshell: add support for IPython, with fallback to code.interact
Gergely Imreh [Fri, 19 Mar 2010 02:21:05 +0000 (10:21 +0800)]
tweepyshell: add support for IPython, with fallback to code.interact

IPython is a much versatile interactive shell compared to code,
use it's power if awailable.

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
14 years agoIncrement version # and update changelog.
Joshua Roesslein [Thu, 18 Mar 2010 23:02:25 +0000 (18:02 -0500)]
Increment version # and update changelog.

Changelog file is no longer being maintained.
Github compare views will replace it.

14 years agoUpdate contributors file.
Joshua Roesslein [Thu, 18 Mar 2010 22:50:48 +0000 (17:50 -0500)]
Update contributors file.

14 years agoMerge commit 'mccutchen/master'
Joshua Roesslein [Wed, 17 Mar 2010 01:21:06 +0000 (20:21 -0500)]
Merge commit 'mccutchen/master'

14 years agoFix for UnboundLocalError in APIMethod.execute
Will McCutchen [Tue, 16 Mar 2010 21:13:00 +0000 (16:13 -0500)]
Fix for UnboundLocalError in APIMethod.execute

14 years agoFix an issue with locale parsing dates.
Ivo Wetzel [Fri, 12 Mar 2010 22:28:54 +0000 (16:28 -0600)]
Fix an issue with locale parsing dates.

Fixes issue #13

14 years agoUpdate contributors. Add Ivo Wetzel.
Joshua Roesslein [Wed, 10 Mar 2010 23:37:32 +0000 (17:37 -0600)]
Update contributors. Add Ivo Wetzel.

14 years agoFix error message parsing.
Ivo Wetzel [Wed, 10 Mar 2010 23:31:40 +0000 (17:31 -0600)]
Fix error message parsing.

14 years agoImplement xAuth support.
Ivo Wetzel [Wed, 10 Mar 2010 23:07:22 +0000 (17:07 -0600)]
Implement xAuth support.

xAuth allows you to exchange an username and password
pair for an OAuth access token.
See http://apiwiki.twitter.com/Twitter-REST-API-Method:-oauth-access_token-for-xAuth
for more details.

14 years agoFix broken parsing of new style retweets.
Ivo Wetzel [Sun, 7 Mar 2010 17:43:48 +0000 (11:43 -0600)]
Fix broken parsing of new style retweets.

14 years agoTweepError now includes the HTTPResponse object of the failed call.
Joshua Roesslein [Fri, 26 Feb 2010 06:25:18 +0000 (00:25 -0600)]
TweepError now includes the HTTPResponse object of the failed call.

Example:
try:
api.get_status(0)
except TweepError, e:
e.response // <-- HTTPResponse object

14 years agoFix an error due to a missing import in binder.py
Joshua Roesslein [Fri, 12 Feb 2010 22:31:51 +0000 (16:31 -0600)]
Fix an error due to a missing import in binder.py

Thanks Doza for reporting!

14 years agoExtract argument conversion to utility class
Michael (Doc) Norton [Thu, 11 Feb 2010 04:26:19 +0000 (12:26 +0800)]
Extract argument conversion to utility class

14 years agoAllow passing headers into Stream.
Joshua Roesslein [Thu, 11 Feb 2010 04:29:52 +0000 (22:29 -0600)]
Allow passing headers into Stream.

14 years agoFix a bug that would result in a 301 redirect with python 2.5 or older using secure...
Joshua Roesslein [Sun, 31 Jan 2010 03:31:20 +0000 (21:31 -0600)]
Fix a bug that would result in a 301 redirect with python 2.5 or older using secure HTTPS.

These versions of python include the port number in the host header.
Twitter will send us a 301 when a host is provided in this manner.
To avoid this redirect this patch manually sets the host w/o the port number.

Fixes issue #12

14 years agoRemove API binding configuration option "timeout". Not used anywhere.
Joshua Roesslein [Sun, 31 Jan 2010 02:02:59 +0000 (20:02 -0600)]
Remove API binding configuration option "timeout". Not used anywhere.

14 years agoStream.py now imports json library with utility function.
Joshua Roesslein [Sun, 31 Jan 2010 01:45:33 +0000 (19:45 -0600)]
Stream.py now imports json library with utility function.

14 years agoUpdate license and copyright years. Hello 2010!
Joshua Roesslein [Sun, 31 Jan 2010 00:12:52 +0000 (18:12 -0600)]
Update license and copyright years. Hello 2010!

14 years agoUpdate unit tests.
Joshua [Sat, 30 Jan 2010 23:52:56 +0000 (17:52 -0600)]
Update unit tests.

14 years agoFix a bug that caused list methods to fail.
Joshua [Sat, 30 Jan 2010 23:52:33 +0000 (17:52 -0600)]
Fix a bug that caused list methods to fail.

14 years agoRe-enable parsing of error messages.
Joshua [Sat, 30 Jan 2010 21:41:50 +0000 (15:41 -0600)]
Re-enable parsing of error messages.

14 years agoUpdate to Parser API. Parser.parse() now takes a APIMethod instance.
Joshua [Sat, 30 Jan 2010 18:56:05 +0000 (12:56 -0600)]
Update to Parser API. Parser.parse() now takes a APIMethod instance.

14 years agoSome major refactoring inside binder.py.
Joshua [Sat, 30 Jan 2010 18:46:26 +0000 (12:46 -0600)]
Some major refactoring inside binder.py.

14 years agoFix API.search() by patching a bug in parsers.
Joshua [Sat, 30 Jan 2010 18:45:38 +0000 (12:45 -0600)]
Fix API.search() by patching a bug in parsers.

14 years agoAdded JSONParser which ModelParser now extends.
Joshua [Sat, 30 Jan 2010 17:08:34 +0000 (11:08 -0600)]
Added JSONParser which ModelParser now extends.

This allows developers to access the raw JSON by using the JSONParser.

Example:
    api = API(parser=JSONParser())
    json = api.user_timeline('twitter')

Also fixed the Cursor objects so they should be working again.

14 years agoOptimize the Model pickling a bit.
Joshua [Sat, 30 Jan 2010 15:58:51 +0000 (09:58 -0600)]
Optimize the Model pickling a bit.

14 years agoRemoved the unused model Retweet.
Joshua [Fri, 29 Jan 2010 07:30:07 +0000 (01:30 -0600)]
Removed the unused model Retweet.

14 years agoRefactored the way tweepy does parsing to make it more customizable by developers.
Joshua [Fri, 29 Jan 2010 05:47:39 +0000 (23:47 -0600)]
Refactored the way tweepy does parsing to make it more customizable by developers.

All parsing of the response payload is now handled by a Parser class defined in
tweepy/parsers.py
The default parser used is ModelParser which parses a JSON payload into a model instance.

Developers may define and use their own custom parsers by extending the Parser class.
To use the custom parser:

    api = API(parser=MyParser())

14 years agoAPI.search() now includes search meta data as attributes of the ResultSet object...
Joshua [Fri, 29 Jan 2010 02:29:55 +0000 (20:29 -0600)]
API.search() now includes search meta data as attributes of the ResultSet object returned.

Example:
    results = api.search('python')
    print 'Search took %s seconds' % results.completed_in

This fixes issue #10 (http://github.com/joshthecoder/tweepy/issues/#issue/10)

Meta data available as of today:
    max_id, since_id, refresh_url, next_page, results_per_page,
    page, completed_in, query

14 years agoAPI methods that use to return list objects now return ResultSet objects.
Joshua [Fri, 29 Jan 2010 02:16:36 +0000 (20:16 -0600)]
API methods that use to return list objects now return ResultSet objects.

14 years agoAllow additional karg parameters that are not listed in allowed_param.
Joshua [Thu, 28 Jan 2010 18:20:07 +0000 (12:20 -0600)]
Allow additional karg parameters that are not listed in allowed_param.

This allows Tweepy to support future parameters twitter may add
without having to patch the library.

14 years agoFixed typo on followers
Arthur Debert [Sun, 17 Jan 2010 03:45:20 +0000 (11:45 +0800)]
Fixed typo  on followers

14 years agoBump version to 1.5 for upcoming release.
Joshua Roesslein [Tue, 12 Jan 2010 22:49:55 +0000 (16:49 -0600)]
Bump version to 1.5 for upcoming release.

14 years agoUpdate docs for API constructor.
Joshua [Tue, 5 Jan 2010 03:27:13 +0000 (21:27 -0600)]
Update docs for API constructor.

14 years agoAdded ModelFactory. This replaces the 'models' dict in the tweepy.models module.
Joshua [Mon, 4 Jan 2010 03:42:03 +0000 (21:42 -0600)]
Added ModelFactory. This replaces the 'models' dict in the tweepy.models module.

This will allow for more flexible plug 'n play for developers that need
to extend Tweepy's models. To use custom models, they will extend the ModelFactory
and then pass this new factory into the API constructor.

Example:
    class MyStatus(Status):
        """A extended Status model"""

    class MyModelFactory(ModelFactory):
        status = MyStatus

    api = API(model_factory=MyModelFactory)

14 years agoFallback to using 'twitter.com' for OAuth.
Joshua [Thu, 31 Dec 2009 18:14:46 +0000 (12:14 -0600)]
Fallback to using 'twitter.com' for OAuth.

This fixes issue #8 for the time being until Twitter resolves the
issue on their end. See issue #1207 on the twitter API tracker.

Note: API calls still use 'api.twitter.com', just the initial OAuth
setup uses 'twitter.com'.

14 years agoMerge branch 'master' of git@github.com:joshthecoder/tweepy
Joshua [Thu, 31 Dec 2009 17:56:28 +0000 (11:56 -0600)]
Merge branch 'master' of git@github.com:joshthecoder/tweepy

14 years agoAdd 'secure' parameter to OAuthHandler constructor.
Ferenc Szalai [Thu, 31 Dec 2009 17:52:29 +0000 (11:52 -0600)]
Add 'secure' parameter to OAuthHandler constructor.

When 'secure' is True, HTTPS will be used for OAuth requests being sent to Twitter.
This only applies to the get token, authorize, and get access token requests. API
requests will not use HTTPS unless the API object also has 'secure' set to True in
its constructor.

Example:
auth = OAuthHandler(token,secret,secure=True)  # use HTTPS for OAuth setup

api = API(auth)  #  will NOT use HTTPS
api_https = API(auth, secure=True)  # will use HTTPS for API requests.

Signed-off-by: Joshua <jroesslein@gmail.com>
14 years agoUpdate wiki URL in readme.
joshthecoder [Wed, 30 Dec 2009 18:05:54 +0000 (11:05 -0700)]
Update wiki URL in readme.

14 years agoAdd Bas Westerbaan to contributors file.
Joshua [Thu, 17 Dec 2009 06:51:44 +0000 (00:51 -0600)]
Add Bas Westerbaan to contributors file.

14 years agoAllow for pagination and other parameters for some helper methods in User model.
Bas Westerbaan [Thu, 17 Dec 2009 06:46:09 +0000 (00:46 -0600)]
Allow for pagination and other parameters for some helper methods in User model.

Merged from bwesterb/tweepy @5c7a7480de1ee99fae8c4a1eef65c127cb83e619

Signed-off-by: Joshua <jroesslein@gmail.com>