在此处使用Tumblr PHP API:https://github.com/tumblr/tumblr.php 如何获得以下标题?
x_ratelimit_api_followers_limit
x_ratelimit_api_followers_remaining
x_ratelimit_api_followers_reset
问题#2 - 每小时限制之外每分钟的请求是否有限制?我试图创建一个简单的自动化应用程序来取消关注不跟踪的用户。我有大约6k粉丝,我跟随2.2k
假设每个请求有20个结果,我不应该达到1000小时限制(应该是410个请求)
$blog_followers = $client->getBlogFollowers($my_blog)->total_users;
$blog_followings = $client->getFollowedBlogs()->total_blogs;
$array_following = array();
while ($i <= $blog_followings) {
$get_followings = $client->getFollowedBlogs(array('offset' => $i));
foreach($get_followings->blogs as $following) {
$array_following[] = $following->url;
}
$i = $i + 20;
}
echo "<h1>array_following</h1>";
print_r($array_following);
// GET FOLLOWERS LIST
$array_followers = array();
$i = 0;
while ($i <= $blog_followers) {
$get_followers = $client->getBlogFollowers("$my_blog", array('offset' => $i));
foreach($get_followers->users as $follower) {
$array_followers[] = $follower->url;
}
$i = $i + 20;
}
echo "<h1>array_followers</h1>";
print_r($array_followers);
我做错了吗?
注意:我的问题与其他问题类似,但请注意原始海报关于速率限制标题的问题从未得到解答:Tumblr API V2 Error code 429: "Rate Limit Exceeded" You are being rate limited, slow down. Header info?