Open derekmd opened 3 years ago
Thanks for writing in about this! Unfortunately this is expected behavior right now, as the filter-by-tag(s) option can be accurately counted at request time, but doing more than one kind of filtering (in this case, by tag and by type) cannot be accurately counted. I'll add a clarifying note about this in the docs, and we'll see if we can make this better on the backend.
Follow-up to https://github.com/tumblr/docs/issues/54
The bug was fixed last month to report the correct
total_posts
when filtering by tag:https://api.tumblr.com/v2/blog/derekmd.tumblr.com/posts?tag=Villa+Amanzi
response.total_posts
= 1 :heavy_check_mark:response.blog.posts
= 2response.blog.total_posts
= 2Filtering by post type also counts as expected:
https://api.tumblr.com/v2/blog/derekmd.tumblr.com/posts/photo
response.total_posts
= 2 :heavy_check_mark:response.blog.posts
= 2response.blog.total_posts
= 2https://api.tumblr.com/v2/blog/derekmd.tumblr.com/posts/text
response.total_posts
= 0 :heavy_check_mark:response.blog.posts
= 2response.blog.total_posts
= 2However if the post type filter is also included in the URL alongside tag filtering, the
total_posts
count is for the blog's unfiltered results:https://api.tumblr.com/v2/blog/derekmd.tumblr.com/posts/photo?tag=Villa+Amanzi
response.total_posts
= 2 :x: (this should be 1 like above)response.blog.posts
= 2response.blog.total_posts
= 2https://api.tumblr.com/v2/blog/derekmd.tumblr.com/posts/text?tag=Villa+Amanzi
response.total_posts
= 2 :x: (this should be 0)response.blog.posts
= 2response.blog.total_posts
= 2