我已阅读Tumblr API V2文档,并了解我可以使用/posts
方法和标记参数来获取具有特定标记的特定博客的帖子,但回复我得到的不包含任何帖子,只包括总数。
我尝试的任何博客和标签组合都适用。我使用的是javascript(不是官方客户端),但即使我使用Tumblr API控制台或直接在浏览器URL中输入请求,结果也是一样的。
示例请求:
http://api.tumblr.com/v2/blog/washingtonpost.tumblr.com/posts/text?tag=culture&api_key=fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4
响应:
{"meta":{"status":200,"msg":"OK"},"response":{"blog":{"title":"The Washington Post","name":"washingtonpost","posts":2647,"url":"http:\/\/washingtonpost.tumblr.com\/","updated":1412647225,"description":"Things you should see and know, from civil rights to Senate races to sports to book reviews. Curated by Julia Carpenter.","is_nsfw":false,"ask":true,"ask_page_title":"Ask away!","ask_anon":true,"share_likes":false},"posts":[],"total_posts":7}}
response.total_posts
计数是准确的,但为什么response.posts
数组为空?我如何使用此响应来获取实际帖子?
编辑:
截至今天,华盛顿邮报上有7篇帖子标记为“文化”。有1个文本帖子,3个引用帖子和3个照片帖子。
This request returns all 3 photo posts