Changelog

Version 3.4.2

Bugfixes:

  • Allow upload of GIFs with size up to 15mb. See #538

Version 3.4.1

Bugfixes:

Version 3.4

Deprecations

  • twitter.api.Api.UpdateBackgroundImage(). Please make sure that your code does not call this function as it will now return a hard error. There is no replacement function. This was deprecated by Twitter around July 2015.
  • twitter.api.Api.PostMedia() has been removed. Please use twitter.api.Api.PostUpdate() instead.
  • twitter.api.Api.PostMultipleMedia(). Please use twitter.api.Api.PostUpdate() instead.

Version 3.3.1

  • Adds support for 280 character limit.

Version 3.3

  • Adds application only authentication. See Twitter’s documentation for details. To use application only authentication, pass application_only_auth when creating the Api; the bearer token will be automatically retrieved.
  • Adds function twitter.api.GetAppOnlyAuthToken()
  • Adds filter_level keyword argument for twitter.api.GetStreamFilter(), twitter.api.GetUserStream()
  • Adds proxies keyword argument for creating an Api instance. Pass a dictionary of proxies for the request to pass through, if not specified allows requests lib to use environmental variables for proxy if any.
  • Adds support for quoted_status to the twitter.models.Status model.

Version 3.2.1

Version 3.2

Deprecations

Nothing is being deprecationed this version, however here’s what’s being deprecated as of v. 3.3.0:

  • twitter.api.Api.UpdateBackgroundImage(). Please make sure that your code does not call this function as it will be returning a hard error. There is no replace function. This was deprecated by Twitter around July 2015.
  • twitter.api.Api.PostMedia() will be removed. Please use twitter.api.Api.PostUpdate() instead.
  • twitter.api.Api.PostMultipleMedia(). Please use twitter.api.Api.PostUpdate() instead.
  • twitter.api.GetFriends() will no longer accept a cursor or count parameter. Please use twitter.api.GetFriendsPaged() instead.
  • twitter.api.GetFollowers() will no longer accept a cursor or count parameter. Please use twitter.api.GetFollowersPaged() instead.

What’s New

What’s Changed

  • twitter.models.Trend’s volume attribute has been renamed tweet_volume in line with Twitter’s naming convention. This change should allow users to access the number of tweets being tweeted for a given Trend. PR #375
  • twitter.ratelimit.RateLimit should behave better now and adds a 1-second padding to requests after sleeping.
  • twitter.ratelimit.RateLimit now keeps track of your rate limit status even if you don’t have sleep_on_rate_limit set to True when instatiating the API. If you want to add different behavior on hitting a rate limit, you should be able to now by querying the rate limit object. See PR #370 for the technical details of the change. There should be no difference in behavior for the defaults, but let us know.

Bugfixes

  • twitter.models.Media again contains a sizes attribute, which was missed back in the Version 3.0 release. PR #360
  • The previously bloated twitter.api.Api.UploadMediaChunked() function has been broken out into three related functions and fixes two an incompatibility with python 2.7. Behavior remains the same, but this should simplify matters. PR #347
  • Fix for twitter.api.Api.PostUpdate() where a passing an integer to the media parameter would cause an iteration error to occur. PR #347
  • Fix for 401 errors that were occuring in the Streaming Endpoints. PR #364

Version 3.1

What’s New

What’s Changed

  • twitter.api.Api.GetStatus() Now accepts the keyword argument include_ext_alt_text which will request alt text to be included with the Status object being returned (if available). Defaults to True.
  • [model].__repr__() functions have been revised for better Unicode compatibility. If you notice any weirdness, please let us know.
  • twitter.api.Api() no longer accepts the shortner parameter; however, see examples/shorten_url.py for an example of how to use a URL shortener with the API.
  • twitter.api.Api._Encode() and twitter.api.Api._EncodePostData() have both been refactored out of the API.
  • twitter.models.Media now has an attribute ext_alt_text for alt (hover) text for images posted to Twitter.
  • twitter.models.Status no longer has the properties relative_created_at, now, or Now. If you require a relative time, we suggest using a third-party library.
  • Updated examples, specifically examples/twitter-to-xhtml.py, examples/view_friends.py, examples/shorten_url.py
  • Updated get_access_token.py script to be python3 compatible.
  • twitter.api.Api.GetStreamFilter() now accepts an optional languages parameter as a list.