diff options
author | Lorenz Diener <[email protected]> | 2017-11-21 13:57:03 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-21 13:57:03 +0100 |
commit | 56ec90f17c2d5b51c46375761379d9ae4e8a0034 (patch) | |
tree | 89bd5b9d33761219788dad49276987929672b5c7 /mastodon | |
parent | e3b72e443136b92933f02429043e5983fc01c71a (diff) | |
parent | 611d3357804df2d1fd9ce74c8f7aa91ffabfd1bd (diff) | |
download | mastodon.py-56ec90f17c2d5b51c46375761379d9ae4e8a0034.tar.gz |
Merge pull request #99 from foozmeat/master
Adds alt text support for media uploads
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index cc16a10..d57fb91 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -777,7 +777,7 @@ class Mastodon: | |||
777 | ### | 777 | ### |
778 | # Writing data: Media | 778 | # Writing data: Media |
779 | ### | 779 | ### |
780 | def media_post(self, media_file, mime_type=None): | 780 | def media_post(self, media_file, mime_type=None, description=None): |
781 | """ | 781 | """ |
782 | Post an image. media_file can either be image data or | 782 | Post an image. media_file can either be image data or |
783 | a file name. If image data is passed directly, the mime | 783 | a file name. If image data is passed directly, the mime |
@@ -805,7 +805,8 @@ class Mastodon: | |||
805 | 805 | ||
806 | media_file_description = (file_name, media_file, mime_type) | 806 | media_file_description = (file_name, media_file, mime_type) |
807 | return self.__api_request('POST', '/api/v1/media', | 807 | return self.__api_request('POST', '/api/v1/media', |
808 | files={'file': media_file_description}) | 808 | files={'file': media_file_description}, |
809 | params={'description': description}) | ||
809 | 810 | ||
810 | ### | 811 | ### |
811 | # Writing data: Domain blocks | 812 | # Writing data: Domain blocks |