douti19680318 2013-10-30 20:27 采纳率: 0%
浏览 86
已采纳

使用Twitter的REST API检索速率限制状态

I'm working with the REST API from Twitter, using abraham's twitteroauth lib. I'm trying to get the rate limit status of my api key to be able to show it directly on my admin panel, I'm using something like :

$rate = $connection->get('application/rate_limit_status');
print_r($rate->resources->statuses);

But I have no idea how to get for example only the '/statuses/home_timeline' status. I've tried several things like $rate->resources->statuses->'/statuses/home_timeline' or $rate->resources->statuses['/statuses/home_timeline'] but nothing seems to work.

Can someone maybe get me on the right way ?

  • 写回答

1条回答 默认 最新

  • duangouhui0446 2014-02-06 06:33
    关注

    Try $rate->resources->statuses->{'/statuses/home_timeline'}

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?