Update AUTHORS, HISTORY, DeprecationWarning on update_status_with_media

This commit is contained in:
Mike Helmick 2014-10-30 11:07:18 -04:00
parent 8548a31238
commit 23a0b62f2c
3 changed files with 17 additions and 2 deletions

View file

@ -50,3 +50,7 @@ Patches and Suggestions
- `Joe Cabrera <https://github.com/greedo>`_, PEP 8 contributions
- `bsbkeven <https://github.com/bsbkeven>`_, Added `lookup_status` function to `endpoints.py`
- `drevicko <https://github.com/drevicko>`_, Added option to yield full page vs individual results in `cursor`
- `Filipe A Ximenes <https://github.com/filipeximenes>`_, Added `upload_media` function to `endpoints.py`
- `Mertcan Mermerkaya <https://github.com/mmermerkaya>`_, Fixed code example in documentation
- `Donne Martin <https://github.com/donnemartin>`_, Fixed typos in `README.rst`
- `Diego Allen <https://github.com/dalleng>`_, Add missing comma in documentation code snippet

View file

@ -12,7 +12,9 @@ History
- 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
- 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)

View file

@ -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):