Skip to content

Commit

Permalink
Update example to demonstrate how to collect all followers [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Feb 28, 2014
1 parent 0cb7e6c commit d26fb7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/RateLimiting.md
Expand Up @@ -10,9 +10,10 @@ Here's an example of how to handle rate limits:
```ruby
MAX_ATTEMPTS = 3
num_attempts = 0
follower_ids = client.follower_ids
begin
num_attempts += 1
retweets = client.retweeted_by_user("sferik")
follower_ids.to_a
rescue Twitter::Error::TooManyRequests => error
if num_attempts <= MAX_ATTEMPTS
# NOTE: Your process could go to sleep for up to 15 minutes but if you
Expand Down

0 comments on commit d26fb7c

Please sign in to comment.