diff --git a/AUTHORS.rst b/AUTHORS.rst index ab86784..24bd911 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -50,3 +50,7 @@ Patches and Suggestions - `Joe Cabrera `_, PEP 8 contributions - `bsbkeven `_, Added `lookup_status` function to `endpoints.py` - `drevicko `_, Added option to yield full page vs individual results in `cursor` +- `Filipe A Ximenes `_, Added `upload_media` function to `endpoints.py` +- `Mertcan Mermerkaya `_, Fixed code example in documentation +- `Donne Martin `_, Fixed typos in `README.rst` +- `Diego Allen `_, Add missing comma in documentation code snippet diff --git a/HISTORY.rst b/HISTORY.rst index 4be8b5a..03567f4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,8 +11,10 @@ History - `cursor` now uses while loop rather than recursion - Fixed issue where Twython was unnecessarily disabling compression - Using `responses` to mock API calls in tests -- Fixed some typos in documentation -- Added retry_after attribute to TwythonRateLimitError +- Fixed some typos in documentation +- Added `retry_after` attribute to `TwythonRateLimitError` +- Added `upload_media` method to `Twython` in favor of `update_with_media` +- Deprecating `update_with_media` per Twitter API 1.1 (https://dev.twitter.com/rest/reference/post/statuses/update_with_media) 3.1.2 (2013-12-05) diff --git a/twython/endpoints.py b/twython/endpoints.py index 9b6fca1..444a920 100644 --- a/twython/endpoints.py +++ b/twython/endpoints.py @@ -14,6 +14,10 @@ This map is organized the order functions are documented at: https://dev.twitter.com/docs/api/1.1 """ +import warnings + +from .advisory import TwythonDeprecationWarning + class EndpointsMixin(object): # Timelines @@ -118,6 +122,11 @@ class EndpointsMixin(object): https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media """ + warnings.warn( + 'This method is deprecated. You should use Twython.upload_media instead.', + TwythonDeprecationWarning, + stacklevel=2 + ) return self.post('statuses/update_with_media', params=params) def upload_media(self, **params):