tumblr / pytumblr

A Python Tumblr API v2 Client
Apache License 2.0
723 stars 196 forks source link

create_link should support thumbnail too #85

Closed jabbalaci closed 7 years ago

jabbalaci commented 7 years ago

If you look at https://www.tumblr.com/docs/en/api/v2#posting and go down to Link Posts, there is a "thumbnail" parameter, which is not accepted by this library. To get it accepted, modify __init__.py:

def _post_valid_options(self, post_type=None):
    ...
    elif post_type == 'link':
        valid += ['title', 'url', 'description', 'thumbnail']

And add 'thumbnail' to the valid list. Now if you create a link with a thumbnail, the thumbnail will also appear.