Authenticate as the second user. ---Mark
http://twitter.com/mccv On Sun, Mar 21, 2010 at 11:55 PM, Rushikesh Bhanage <rishibhan...@gmail.com>wrote: > Hi, > (Note: In my app, single white listed useraccount's requests are not > sufficient to complete particular task, so i need to switch from one account > to another without breaking operation, if previous A/C's hits got over. ) > In my case both the users are authenticated. Now problem is that how to > switch from one user to another, when next user comes, he should come up > with it's hits for the operations, when previous user's hits got over. In > such situation how can i use rate_limit_status method. > > Thank you in advance, > > rishibhanage > > On Mon, Mar 22, 2010 at 1:19 AM, Chris Thomson <chri...@chris24.ca> wrote: > >> The rate_limit_status method does not take a username as a parameter. All >> account methods act on the authenticating user's account (or in the case of >> an unauthenticated call, the requesting IP address). In order to get each >> other's rate limit information, you'll need to have both the user's >> authenticated as themselves. >> >> -- >> Chris Thomson >> >> On Mar 21, 2010, at 8:01 AM, Rushikesh Bhanage wrote: >> >> Hi, there, >> I am using rest api method in my app, in that, I have two users(i.e >> white-listed user accounts.) and need to get each user's account rate-limit >> request balance, I am using following URL to get request balance. >> >> ' >> http://twitter.com/account/rate_limit_status/'.$unm.'.xml<http://twitter.com/account/rate_limit_status/%27.$unm.%27.xml>'. >> Here $unm is user name passed through ratelimit() function . >> >> Below is the code logic: (using cURL functions ) >> >> [ function Checklimit() >> { >> for($i=0; $i<2; $i++) >> { >> $usrlimit = >> $this->ratelimit($this->u[$i]); // ratelimit($unm) >> function will give array containing remaining hits. >> foreach($usrlimit as $key=>$val) >> // $this->u[] is the array used for fetching users with $i. >> { >> if($key == 'remaining-hits') >> { >> if($val != 0) >> >> { // here >> will return array element which is having hits. >> return >> $i; // here it doesn't >> come inside when value of ratelimit of first user comes to an end >> } >> >> } >> } >> // Actually here it goes to second user but does not get it's >> hits from api using ratelimit function. gets same 0 as like first user. It >> will return -1 when no user is having hits. >> } >> return -1; >> } >> >> ] >> >> Can I have some clue, please. >> >> Thank You in advance. >> >> with regards, >> rishibhanage. >> >> >> >> >> To unsubscribe from this group, send email to twitter-development-talk+ >> unsubscribegooglegroups.com or reply to this email with the words "REMOVE >> ME" as the subject. >> >> >> To unsubscribe from this group, send email to twitter-development-talk+ >> unsubscribegooglegroups.com or reply to this email with the words "REMOVE >> ME" as the subject. >> > > To unsubscribe from this group, send email to twitter-development-talk+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > To unsubscribe from this group, send email to twitter-development-talk+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.