Create a photoset post using several urls
aomizuan opened this issue · comments
i cant figure out how create photoset using several urls
if someone could explain to me, it whould be great
The Tumblr API doesn't allow to post a photoset using multiple urls, you'd have to send them using the data tag.
https://www.tumblr.com/docs/en/api/v2#posting
#Creates a photoset post using several local filepaths
client.create_photo(blogName, state="draft", tags=["jb is cool"], format="markdown",
data=["/Users/johnb/path/to/my/image.jpg", "/Users/johnb/Pictures/kittens.jpg"],
caption="## Mega sweet kittens")
I'm checking the documentation and I see that there is another endpoint to create a new post entry (/posts
instead of /post
wich is currently used and marked as legacy).
So it's possible to create a post with a photoset coming for severals urls images using the new format set up by the tumblr api (https://www.tumblr.com/docs/npf). But this change involve some extra work on this library because other post creation (text, video, etc.) will be impacted.