If you provided a (non-rate-limited!) call to see what the current
limit is, that would allow me to dynamically adapt the requests so as
not to exceed it. Seems like that would be a win for everyone.
I've even been known to reply to a few items.
Was this a general comment on the effects of my late-night coding
endeavors, or did I miss a discussion on about making the rate limit
available via the API? I just rechecked my list archives and I don't
see anything specific on that, but it's hard to sort it out from all
the "how come my program stops working after a while" messages.
In this case see:Bad request for friends_timeline.json?
> Why create an explicit method when that same data could be available
> implicitly?
Let's not cross the line from curmudgeon (an ancient and honorable
profession) to obtuse.
1. My users would rather have me reduce update frequency throughout an
hour than not update at all for much of it.
2. Twitter's servers would prefer that I spread by 30 queries out over
an hour, not all in the first half hour.
Or for a more RL example. Would you rather find out the speed limit is
30 by reading the sign, or getting stopped by the policeman?
Actually, I'm going with Kee here. It's better from a UX perspective if you
can warn the user in advance that the service is degraded, and/or
automatically reduce your call frequency. I'd rather do that than burn up
my thirty in thirty minutes, and be completely dead for a half hour after.
Already people are complaining with things like, "sorry I couldn't reply,
twhirl put me in timeout." Clearly it's not twhirl's fault, but the user
thinks it is.
So I'd rather know and make adjustments right from the get-go, rather than
surprise the user that they're Twitter-less for half the time because they
didn't know they wouldn't get their full 70.
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- Courage is being scared to death, and saddling up anyway. -- John Wayne ----
http://twitter.com/account/rate_limit_status
Also: be nice, please.
--
Alex Payne
http://twitter.com/al3x
What would be a suggested frequency to call it, every hour? Also, does this
count against the limit? (I assume not but I always check. :-)
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- You can't have everything. Where would you put it? -- Steven Wright --------
--
Alex Payne
http://twitter.com/al3x
Sweet.
% perl -I./lib -MData::Dumper -MNet::Twitter -e 'print Dumper(new
Net::Twitter()->rate_limit());'
Net::Twitter::rate_limit: Authorization required for this call. at lib/
Net/Twitter.pm line 520.
% perl -I./lib -MData::Dumper -MNet::Twitter -e 'print Dumper(new
Net::Twitter(user=>"xxx",pass=>"xxx")->rate_limit());'
$VAR1 = {
'remaining_hits' => 30
};
Does this mean I don't get my cookie? :-)
"Mmm, coconut!"
(Sorry, watching Sledge Hammer reruns on DVD ...)
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- What's another word for thesaurus? -----------------------------------------
> curl -I -ku spaztest:###### https://twitter.com/account/rate_limit_status
HTTP/1.1 404 Not Found
Date: Mon, 26 May 2008 22:46:12 GMT
Server: hi
Status: 404 Not Found
(same with http)
--
Ed Finkler
http://funkatron.com
AIM: funka7ron
ICQ: 3922133
Skype: funka7ron
Need to append your correct protocol ending. E.g. .json
Ah, handy!
'remaining_hits' => 30
Because it said, "remaining_hits", and you have to be authorized, I
made the assumption that it was actually a counter, but that doesn't
appear to be the case. That's really just the per-hour limit for the
current user, it doesn't reflect usage. Correct? And your limit is
reset at the top of the hour? That's fine, I just want to be sure.
Thanks,
-kee
--
Alex Payne
http://twitter.com/al3x
> > Then there shouldn't be a problem :-)
> Timezones?
That shouldn't make a difference unless the timezone offset is not a full
hour, AIUI.
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- Never underestimate the power of stupid people in large groups. ------------