Package com.slack.api.methods
Interface MethodsCustomRateLimitResolver
- All Known Implementing Classes:
MethodsCustomRateLimitResolver.Default
public interface MethodsCustomRateLimitResolver
Custom rate limit resolver.
When you need to adjust the rate limits for some reason, you can implement this interface and pass it to MethodsConfig#setCustomRateLimitResolver() method. With that, you can override the allowed requests per minute for selected methods.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetCustomAllowedRequestsForAssistantThreadsSetStatusPerMinute(String teamId, String channel) Return a present value only when you want to override the allowed requests per minute.getCustomAllowedRequestsForChatPostMessagePerMinute(String teamId, String channel) Return a present value only when you want to override the allowed requests per minute.getCustomAllowedRequestsPerMinute(String teamId, String methodName) Return a present value only when you want to override the allowed requests per minute.
-
Field Details
-
DEFAULT
-
-
Method Details
-
getCustomAllowedRequestsPerMinute
Return a present value only when you want to override the allowed requests per minute. Otherwise, returning Optional.empty() will result in falling back to the built-in calculation.- Parameters:
teamId- the workspace IDmethodName- the method name such as "auth.test"- Returns:
- the number of allowed requests per minute
-
getCustomAllowedRequestsForChatPostMessagePerMinute
Optional<Integer> getCustomAllowedRequestsForChatPostMessagePerMinute(String teamId, String channel) Return a present value only when you want to override the allowed requests per minute. Otherwise, returning Optional.empty() will result in falling back to the built-in calculation.- Parameters:
teamId- the workspace IDchannel- either a channel ID or channel name- Returns:
- the number of allowed requests per minute
-
getCustomAllowedRequestsForAssistantThreadsSetStatusPerMinute
Optional<Integer> getCustomAllowedRequestsForAssistantThreadsSetStatusPerMinute(String teamId, String channel) Return a present value only when you want to override the allowed requests per minute. Otherwise, returning Optional.empty() will result in falling back to the built-in calculation.- Parameters:
teamId- the workspace IDchannel- either a channel ID or channel name- Returns:
- the number of allowed requests per minute
-