Class BotBlockAPI


  • public class BotBlockAPI
    extends java.lang.Object
    Class used to define the auth-tokens used for the different sites.
    The instance of this class will be used in the PostAction class.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BotBlockAPI.Builder
      Builder class to create an instance of BotBlockAPI
    • Constructor Summary

      Constructors 
      Constructor Description
      BotBlockAPI​(@NotNull java.util.Map<java.lang.String,​java.lang.String> authTokens)
      Constructor to set the Map with the sites and tokens.
      BotBlockAPI​(@NotNull java.util.Map<java.lang.String,​java.lang.String> authTokens, int updateInterval)
      Constructor to set the Map with the sites and tokens and also the update delay.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getAuthTokens()  
      int getUpdateInterval()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BotBlockAPI

        public BotBlockAPI​(@NotNull
                           @NotNull java.util.Map<java.lang.String,​java.lang.String> authTokens)
        Constructor to set the Map with the sites and tokens.
        This will also set the update interval to 30 minutes.
        Parameters:
        authTokens - A not null Map of sites and their tokens.
        You may receive the API-token from your bot list.
      • BotBlockAPI

        public BotBlockAPI​(@NotNull
                           @NotNull java.util.Map<java.lang.String,​java.lang.String> authTokens,
                           int updateInterval)
        Constructor to set the Map with the sites and tokens and also the update delay.
        Parameters:
        authTokens - A not null Map of sites and their tokens.
        You may receive the API-token from your bot list.
        updateInterval - The update interval to set.
    • Method Detail

      • getAuthTokens

        public java.util.Map<java.lang.String,​java.lang.String> getAuthTokens()
      • getUpdateInterval

        public int getUpdateInterval()