twython v3.1.0 Release Notes
Release Date: 2013-09-25 // over 10 years ago-
- Added
html_for_tweet
static method. This method accepts a tweet object returned from a Twitter API call and will return a string with urls, mentions and hashtags in the tweet replaced with HTML. - Pass
client_args
to the streaming__init__
, much like in core Twython (you can pass headers, timeout, hooks, proxies, etc.). - Streamer has new parameter
handlers
which accepts a list of strings related to functions that are apart of the Streaming class and start with "on_". i.e. ['delete'] is passed, when 'delete' is received from a stream response;on_delete
will be called. - When an actual request error happens and a
RequestException
is raised, it is caught and aTwythonError
is raised instead for convenience. - โ Added "cursor"-like functionality. Endpoints with the attribute
iter_mode
will be able to be passed toTwython.cursor
and returned as a generator. - ๐
Twython.search_gen
has been deprecated. Please usetwitter.cursor(twitter.search, q='your_query')
instead, wheretwitter
is yourTwython
instance. - Added methods
get_list_memberships
,get_twitter_configuration
,get_supported_languages
,get_privacy_policy
,get_tos
- Added
auth_endpoint
parameter toTwython.__init__
for cases when the right parameters weren't being shown during the authentication step. - ๐ Fixed streaming issue where results wouldn't be returned for streams that weren't so active (See https://github.com/ryanmcgrath/twython/issues/202#issuecomment-19915708)
- Streaming API now uses
_transparent_params
so when passedTrue
orFalse
or an array, etc. Twython formats it to meet Twitter parameter standards (i.e. ['ryanmcgrath', 'mikehelmick', 'twitterapi'] would convert to string 'ryanmcgrath,mikehelmick,twitterapi')
- Added