Hello,
I can't manage to understand how to use the rate limiter, and the documentation is too short for me.
I tried on purpose to send the same search query time after time to reach the limiter but can't understand how it is supposed to work.
Here is what I did :
Anyway, can you provide a clearer way to test if I didn't exceeded the search limit and in case I reached the limit to wait for the counter reset.
Thanks a lot
I can't manage to understand how to use the rate limiter, and the documentation is too short for me.
I tried on purpose to send the same search query time after time to reach the limiter but can't understand how it is supposed to work.
Here is what I did :
public void SearchByDay()The event wasn't triggered but now I can't access anything (i hope Twitter will not ban me for too long)
{
var rateLimits = RateLimit.GetCurrentCredentialsRateLimits();
// Enable Tweetinvi RateLimit Handler
RateLimit.UseRateLimitAwaiter = true;
// Getting notified when your application is being stopped to wait for RateLimits to be available
RateLimit.QueryAwaitingForRateLimit += (sender, args) =>
{
Console.WriteLine("{0} is awaiting {1}ms for RateLimit to be available", args.Query, args.ResetInMilliseconds);
};
for (int i = 0; i <= 200; i++)
{
*** RUN A SEARCH QUERY HERE ***
rateLimits = RateLimit.GetCurrentCredentialsRateLimits();
}
}
Anyway, can you provide a clearer way to test if I didn't exceeded the search limit and in case I reached the limit to wait for the counter reset.
Thanks a lot