Commit f99b1da5 authored by Florent Espanet's avatar Florent Espanet
Browse files

Add media_ids parameter to update_status.

`statuses/update` now support the parameter `media_ids`. It makes it
possible to update a status with an attached media.

See also :

parent 460acae6
...@@ -175,11 +175,14 @@ class API(object): ...@@ -175,11 +175,14 @@ class API(object):
allowed_param=['id'] allowed_param=['id']
) )
@property def update_status(self, media_ids=None, *args, **kwargs):
def update_status(self):
""" :reference: """ :reference:
:allowed_param:'status', 'in_reply_to_status_id', 'lat', 'long', 'source', 'place_id', 'display_coordinates' :allowed_param:'status', 'in_reply_to_status_id', 'lat', 'long', 'source', 'place_id', 'display_coordinates', 'media_ids'
""" """
post_data = {}
if media_ids is not None:
post_data["media_ids"] = list_to_csv(media_ids)
return bind_api( return bind_api(
api=self, api=self,
path='/statuses/update.json', path='/statuses/update.json',
...@@ -187,7 +190,7 @@ class API(object): ...@@ -187,7 +190,7 @@ class API(object):
payload_type='status', payload_type='status',
allowed_param=['status', 'in_reply_to_status_id', 'lat', 'long', 'source', 'place_id', 'display_coordinates'], allowed_param=['status', 'in_reply_to_status_id', 'lat', 'long', 'source', 'place_id', 'display_coordinates'],
require_auth=True require_auth=True
) )(post_data=post_data, *args, **kwargs)
def media_upload(self, filename, *args, **kwargs): def media_upload(self, filename, *args, **kwargs):
""" :reference: """ :reference:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment