Avoid 'Rate limit exceeded' error on 'ls' command
Avoid 'Rate limit exceeded' error on 'ls' command

When listing friends or followers, the Twitter API sends them back to
you by batches of 20 users. If there are more, you then have to make
another request.

With more than 300 friends (or followers), this leads you to make more
than 15 calls. Unfortunately, the rate limit for this call is set at 15
calls per 15 mn.

This patch makes two modifications.

First, the users are printed out as they are received, and not once they
are all received.
Second, once you made 15 API requests, the program will wait for 16mn
before pursuing, in order to avoid the 'Rate limit exceeded' error.

This is not ideal (the stream is effectiveley in pause for 16mn...), but
still better that the old way, when, with 400 friends, all I could get
from 'ls fr' was 'Rate limit exceeded'. :)

jthelin/rainbowstream,jthelin/rainbowstream,DTVD/rainbowstream,DTVD/rainbowstream