tumblr / pytumblr

A Python Tumblr API v2 Client
Apache License 2.0
724 stars 199 forks source link

Adding source_url to a new post #145

Open alglez opened 3 years ago

alglez commented 3 years ago

Checking the tumblr API I don´t think there is not a request parameter to add a source_url for the content.

For example creating a photo. The source parameter refers to the source for the picture, but the source_url or "content source" is actually the original source for the content. Which is explained here:

https://support.tumblr.com/post/125279368827/heres-a-nice-thing-no-matter-how-many-times-an

It will be nice to be able to add that directly from the API when creating a new post.

mdawaffe commented 3 years ago

Though not well documented, the HTTP API does accept a source_url string parameter for this, but (as you know) the python library does not. I think getting this working would only require adding 'source_url' to the list of post parameters at:

https://github.com/tumblr/pytumblr/blob/afe2c4c67068095771a1d3e70eba20fa4e513c08/pytumblr/__init__.py#L511

Are you interested in writing a PR?

alglez commented 3 years ago

I reread the HTTP API because I thought it was missing as well there (post vs posts neue post format), but yes you are right, I can write and test that PR. Probably during next week.