Class PostAction


  • public class PostAction
    extends Object
    Class used to perform POST requests towards the /api/count endpoint of BotBlock.

    The class offers options to post either manually or automatically.

    • Constructor Detail

      • PostAction

        public PostAction​(@Nonnull
                          String id)
        Constructor to get an instance of PostAction.

        Using this constructor will set the following default values:

        • User-Agent: "JavaBotBlockAPI-0000/API_VERSION (Unknown; +https://jbba.dev) DBots/{id}"

        Following Exceptions can be thrown from the CheckUtil:

        Parameters:
        id - The id of the bot. This is required for the internal User-Agent.
      • PostAction

        public PostAction​(@Nonnull
                          String userAgent,
                          @Nonnull
                          String id)
        Constructor to get an instance of PostAction.
        This constructor allows you to set a own User-Agent by providing any String as the first argument.

        Note that you can provide {id} inside the userAgent to get it replaced with the provided id.

        Following Exceptions can be thrown from the CheckUtil:

        Parameters:
        userAgent - The Name to use as User-Agent.
        id - The id of the bot. This is required for the internal User-Agent.