Package org.botblock.javabotblockapi

## Class BotBlockAPI

- java.lang.Object
- - org.botblock.javabotblockapi.BotBlockAPI

-     public class BotBlockAPI
      extends 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.

  Use the `BotBlockAPI.Builder` class for easy creation.

- - ### 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 Map<String,​String> tokens)` | Constructor to set the Map with the sites and tokens.
    `BotBlockAPI​(@NotNull Map<String,​String> tokens, @NotNull Integer updateDelay)` | 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
    --- | --- | ---
    `Map<String,​String>` | `getTokens()` |
    `int` | `getUpdateDelay()` |

    - ### 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 Map<String,​String> tokens)

      Constructor to set the Map with the sites and tokens.
      This will also set the update interval to 30 minutes.
      Parameters:
        `tokens` - A not null Map of sites and their tokens.
        You may receive the API-token from your bot list.
      Throws:
        `IllegalArgumentException` - When the provided Map is empty.

    - #### BotBlockAPI

          public BotBlockAPI​(@NotNull
                             @NotNull Map<String,​String> tokens,
                             @NotNull
                             @NotNull Integer updateDelay)

      Constructor to set the Map with the sites and tokens and also the update delay.
      Parameters:
        `tokens` - A not null Map of sites and their tokens.
        You may receive the API-token from your bot list.
        `updateDelay` - The update interval to set.
      Throws:
        `IllegalArgumentException` - When the provided Map is empty, or updateDelay is below 2.

  - ### Method Detail

    - #### getTokens

          public Map<String,​String> getTokens()

    - #### getUpdateDelay

          public int getUpdateDelay()