Class Site


  • public class Site
    extends Object
    This class contains all known sites that are supported by BotBlock's APIs for getting Bot info, getting list info or posting Bot info to a list.

    The static instances of this class allow an easy and quick usage in various methods of JavaBotBlockAPI without the need to remember any bot list name.

    Supported HTTP Methods

    The Javadoc comment of each instance lists what HTTP method is supported.
    If a List supports GET can you use all methods from the GetListAction and GetBotAction classes of the Request module while Lists supporting POST also can be utilized within the BotBlockAPI to posts Bot information to that list.

    Trying to use a List for an action it doesn't support (i.e. using a List for POST while it only supports GET) will result in exceptions being thrown.
    Instances marked as Deprecated won't support either method type. If a replacement is mentioned using the DeprecatedSince's replacement value should it be used in favour of the deprecated Instance.

    Since:
    6.3.0
    • Method Detail

      • getName

        public String getName()
        The name used by the BotBlock API to identify the site.
        The name usually represents the domain of the bot list without the https in front of it.
        Returns:
        The name of the site used for the BotBlock API.
      • supportsGet

        public boolean supportsGet()
        Whether the site supports GET requests towards itself or not.
        Returns:
        True if the site supports GET request, otherwise false.
      • supportsPost

        public boolean supportsPost()
        Whether the site supports POST requests towards itself or not.
        Returns:
        True if the site supports POST request, otherwise false.