Tumblr API "limit" argument should default to maximum if set too high

197 views
Skip to first unread message

Daniel Jalkut

unread,
Feb 6, 2018, 12:41:40 PM2/6/18
to Tumblr API Discussion
Hi - a couple things:

1. The API Documentation is out of date with respect to the "limit" argument. It says it accepts a value from 1-20 but testing indicates it accepts a value from 1-50.

2. If the specified value is higher than 50, it defaults to 20. It would be more in the spirit of satisfying the API client's intention to default to 50, or more generally, to default to whatever the maximum is given a value that exceeds that maximum.

The practical applicability here is in my app MarsEdit, which supports a user-facing setting for controlling how many posts to fetch in each request. Setting a higher "limit" value makes a lot of sense for blogs that have hundreds and hundreds of posts, so that the entire archive of posts can be downloaded in only a few requests, instead of dozens.

A user with a particularly large number of posts might get eager and set the limit value to 100 or higher, hoping to get things downloaded more efficiently. Unfortunately the way things are currently set up, they'll end up with a less efficient download as the API defaults to 20 at a time.

Daniel

Michael Ceyko

unread,
Feb 7, 2018, 1:57:40 PM2/7/18
to Tumblr API Discussion
Hey Daniel,

Thank you for your input.

This is a good idea. I don't see any reason why we shouldn't do this, so I'm filing a ticket internally for it to be changed.

Regards,
Mike

Daniel Jalkut

unread,
Feb 8, 2018, 8:27:41 AM2/8/18
to Tumblr API Discussion
Thanks, Michael!
Reply all
Reply to author
Forward
0 new messages