Class BotlistBuilder
java.lang.Object
de.chojo.jdautil.botlist.builder.BotlistBuilder
- All Implemented Interfaces:
AuthStage, BaseUrlStage, Buildable, ClientStage, ConfigurationStage
public class BotlistBuilder
extends Object
implements ClientStage, BaseUrlStage, AuthStage, ConfigurationStage, Buildable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuild()static ClientStageforClient(ShardManager shardManager) useShardStats(boolean shardStats) Report the stats per shard or a total for all connected shards.withAuthentication(AuthHandler authHandler) withBaseUrl(String baseUrl) withHttpClient(HttpClient httpClient) Set the http clientwithObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Set the object mapperwithStatusCodeHandler(StatusCodeHandler statusCodeHandler) Set the status handletwithSubmission(StatsMapper statsMapper) Set the submission servicewithVoteChecker(VoteChecker voteChecker) Sets the vote checker that asks the bot list whether a user voted.withVoteReceiver(VoteReceiver<?> voteReceiver) Set the vote receiver
-
Field Details
-
DEFAULT_CLIENT
-
-
Method Details
-
builder
-
useShardStats
Description copied from interface:ConfigurationStageReport the stats per shard or a total for all connected shards. Only enable it when the list accepts per shard stats and the stats mapper writes the shard id.- Specified by:
useShardStatsin interfaceConfigurationStage- Parameters:
shardStats- true if stats should be reported per shard. Defaultfalse- Returns:
- builder instance
-
forClient
- Specified by:
forClientin interfaceClientStage
-
withBaseUrl
- Specified by:
withBaseUrlin interfaceBaseUrlStage
-
withSubmission
Description copied from interface:ConfigurationStageSet the submission service- Specified by:
withSubmissionin interfaceConfigurationStage- Parameters:
statsMapper- submission service- Returns:
- builder instance
-
withVoteChecker
Description copied from interface:ConfigurationStageSets the vote checker that asks the bot list whether a user voted. PreferConfigurationStage.withVoteReceiver(VoteReceiver)to be notified of votes; the checker is for looking up a single user.- Specified by:
withVoteCheckerin interfaceConfigurationStage- Parameters:
voteChecker- vote checker- Returns:
- builder instance
-
withHttpClient
Description copied from interface:ConfigurationStageSet the http client- Specified by:
withHttpClientin interfaceConfigurationStage- Parameters:
httpClient- http client- Returns:
- builder instance
-
withObjectMapper
Description copied from interface:ConfigurationStageSet the object mapper- Specified by:
withObjectMapperin interfaceConfigurationStage- Parameters:
objectMapper- object mapper- Returns:
- builder instance
-
withVoteReceiver
Description copied from interface:ConfigurationStageSet the vote receiver- Specified by:
withVoteReceiverin interfaceConfigurationStage- Parameters:
voteReceiver- vote receiver instance- Returns:
- builder instance
-
build
-