Skip to content

Commit

Permalink
fix: comply with slower-than-documented helix refill rate
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed May 1, 2022
1 parent f949d85 commit 4627bdb
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -23,6 +23,7 @@
import feign.okhttp.OkHttpClient;
import feign.slf4j.Slf4jLogger;
import io.github.bucket4j.Bandwidth;
import io.github.bucket4j.Refill;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomStringUtils;
Expand Down Expand Up @@ -55,7 +56,7 @@ public class TwitchHelixBuilder {
/**
* @see <a href="https://dev.twitch.tv/docs/api/guide#rate-limits">Helix Rate Limit Reference</a>
*/
public static final Bandwidth DEFAULT_BANDWIDTH = Bandwidth.simple(800, Duration.ofMinutes(1));
public static final Bandwidth DEFAULT_BANDWIDTH = Bandwidth.classic(800, Refill.greedy(600, Duration.ofMinutes(1)));

/**
* Client Id
Expand Down

1 comment on commit 4627bdb

@iProdigy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.