Package com.slack.api.methods
Class MethodsCustomRateLimitResolver.Default
- java.lang.Object
-
- com.slack.api.methods.MethodsCustomRateLimitResolver.Default
-
- All Implemented Interfaces:
MethodsCustomRateLimitResolver
- Enclosing interface:
- MethodsCustomRateLimitResolver
public static class MethodsCustomRateLimitResolver.Default extends Object implements MethodsCustomRateLimitResolver
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.slack.api.methods.MethodsCustomRateLimitResolver
MethodsCustomRateLimitResolver.Default
-
-
Field Summary
-
Fields inherited from interface com.slack.api.methods.MethodsCustomRateLimitResolver
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Integer>
getCustomAllowedRequestsForChatPostMessagePerMinute(String teamId, String channel)
Return a present value only when you want to override the allowed requests per minute.Optional<Integer>
getCustomAllowedRequestsPerMinute(String teamId, String methodName)
Return a present value only when you want to override the allowed requests per minute.
-
-
-
Method Detail
-
getCustomAllowedRequestsPerMinute
public Optional<Integer> getCustomAllowedRequestsPerMinute(String teamId, String methodName)
Description copied from interface:MethodsCustomRateLimitResolver
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.- Specified by:
getCustomAllowedRequestsPerMinute
in interfaceMethodsCustomRateLimitResolver
- Parameters:
teamId
- the workspace IDmethodName
- the method name such as "auth.test"- Returns:
- the number of allowed requests per minute
-
getCustomAllowedRequestsForChatPostMessagePerMinute
public Optional<Integer> getCustomAllowedRequestsForChatPostMessagePerMinute(String teamId, String channel)
Description copied from interface:MethodsCustomRateLimitResolver
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.- Specified by:
getCustomAllowedRequestsForChatPostMessagePerMinute
in interfaceMethodsCustomRateLimitResolver
- Parameters:
teamId
- the workspace IDchannel
- either a channel ID or channel name- Returns:
- the number of allowed requests per minute
-
-