Class StatsMapper
java.lang.Object
de.chojo.jdautil.botlist.modules.shared.RouteProvider
de.chojo.jdautil.botlist.modules.submission.StatsMapper
- All Implemented Interfaces:
ISubmissionService
Maps statistics to the request body of a bot list and names the route and HTTP method to send them with.
-
Method Summary
Modifier and TypeMethodDescriptiondata(BotListData data) method()static StatsMapperof(String method, String route, BiConsumer<BotListData, MapBuilder<String, Object>> mapper) Sends the statistics with the given HTTP method.static StatsMapperof(String route, BiConsumer<BotListData, MapBuilder<String, Object>> mapper) Sends the statistics with a POST request.Methods inherited from class RouteProvider
route
-
Method Details
-
of
public static StatsMapper of(String route, BiConsumer<BotListData, MapBuilder<String, Object>> mapper) Sends the statistics with a POST request.- Parameters:
route- route relative to the base url. {id} is replaced with the application id.mapper- writes the statistics into the request body- Returns:
- stats mapper
-
of
public static StatsMapper of(String method, String route, BiConsumer<BotListData, MapBuilder<String, Object>> mapper) Sends the statistics with the given HTTP method.- Parameters:
method- HTTP method, for example POST or PATCHroute- route relative to the base url. {id} is replaced with the application id.mapper- writes the statistics into the request body- Returns:
- stats mapper
-
data
- Specified by:
datain interfaceISubmissionService
-
method
-