1515 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
1616 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1717 */
18- package org .botblock .javabotblockapi ;
1918
20- import org .botblock .javabotblockapi .requests .CheckUtil ;
21- import org .botblock .javabotblockapi .requests .PostAction ;
19+ package org .botblock .javabotblockapi .core ;
20+
21+ import org .botblock .javabotblockapi .core .requests .CheckUtil ;
2222
2323import javax .annotation .Nonnull ;
2424import java .util .HashMap ;
2525import java .util .Map ;
2626
2727/**
2828 * Class used to define the auth-tokens used for the different sites.
29- * <br>The instance of this class will be used in the {@link PostAction PostAction} class.
30- *
31- * <p>Use the {@link org.botblock.javabotblockapi.BotBlockAPI.Builder BotBlockAPI.Builder} class for easy creation.
29+ *
30+ * <p>Use the {@link org.botblock.javabotblockapi.core.BotBlockAPI.Builder BotBlockAPI.Builder} class for easy creation.
3231 */
3332public class BotBlockAPI {
3433 public static final int DEFAULT_DELAY = 30 ;
35-
34+
3635 private final Map <String , String > tokens ;
3736 private final int updateDelay ;
3837
@@ -46,33 +45,33 @@ private BotBlockAPI(@Nonnull Map<String, String> tokens, int updateDelay){
4645 this .tokens = tokens ;
4746 this .updateDelay = updateDelay ;
4847 }
49-
48+
5049 public Map <String , String > getTokens (){
5150 return tokens ;
5251 }
53-
52+
5453 public int getUpdateDelay (){
5554 return updateDelay ;
5655 }
57-
56+
5857 /**
59- * Builder class to create an instance of {@link org.botblock.javabotblockapi.BotBlockAPI BotBlockAPI}
58+ * Builder class to create an instance of {@link org.botblock.javabotblockapi.core. BotBlockAPI BotBlockAPI}
6059 */
6160 public static class Builder {
6261 private Map <String , String > tokens = new HashMap <>();
6362 private int updateDelay = DEFAULT_DELAY ;
64-
63+
6564 /**
6665 * Empty constructor to get the class.
6766 */
6867 public Builder (){}
69-
68+
7069 /**
71- * Adds the provided {@link org.botblock.javabotblockapi.Site Site name} and token to the Map.
70+ * Adds the provided {@link org.botblock.javabotblockapi.core. Site Site name} and token to the Map.
7271 * <br>Entries with the same key will be overwritten.
7372 *
7473 * @param site
75- * The {@link org.botblock.javabotblockapi.Site Site} to get the name from.
74+ * The {@link org.botblock.javabotblockapi.core. Site Site} to get the name from.
7675 * @param token
7776 * The API token from the corresponding bot list. May not be null or empty.
7877 * <br>You may receive the API token from the bot list.
@@ -86,12 +85,12 @@ public Builder(){}
8685 */
8786 public Builder addAuthToken (@ Nonnull Site site , @ Nonnull String token ){
8887 CheckUtil .notEmpty (token , "Token" );
89-
88+
9089 tokens .put (site .getSite (), token );
91-
90+
9291 return this ;
9392 }
94-
93+
9594 /**
9695 * Adds the provided Site name and token to the Map.
9796 * <br>Entries with the same key will be overwritten.
@@ -113,10 +112,10 @@ public Builder addAuthToken(@Nonnull String site, @Nonnull String token){
113112 CheckUtil .notEmpty (token , "Token" );
114113
115114 tokens .put (site , token );
116-
115+
117116 return this ;
118117 }
119-
118+
120119 /**
121120 * Sets the provided Map as the new Map.
122121 * <br><b>This will overwrite every previously set entry!</b>
@@ -131,9 +130,9 @@ public Builder addAuthToken(@Nonnull String site, @Nonnull String token){
131130 */
132131 public Builder setAuthTokens (@ Nonnull Map <String , String > tokens ){
133132 CheckUtil .notEmpty (tokens , "Tokens" );
134-
133+
135134 this .tokens = tokens ;
136-
135+
137136 return this ;
138137 }
139138
@@ -151,19 +150,19 @@ public Builder setAuthTokens(@Nonnull Map<String, String> tokens){
151150 */
152151 public Builder setUpdateDelay (@ Nonnull Integer updateDelay ){
153152 CheckUtil .condition (updateDelay < 2 , "UpdateDelay may not be less than 2." );
154-
153+
155154 this .updateDelay = updateDelay ;
156-
155+
157156 return this ;
158157 }
159-
158+
160159 /**
161- * Builds the instance of {@link org.botblock.javabotblockapi.BotBlockAPI BotBlockAPI}.
162- *
160+ * Builds the instance of {@link org.botblock.javabotblockapi.core. BotBlockAPI BotBlockAPI}.
161+ *
163162 * @throws java.lang.NullPointerException
164163 * When the Tokens Map is empty.
165164 *
166- * @return The built, usable {@link org.botblock.javabotblockapi.BotBlockAPI BotBlockAPI}.
165+ * @return The built, usable {@link org.botblock.javabotblockapi.core. BotBlockAPI BotBlockAPI}.
167166 */
168167 public BotBlockAPI build (){
169168 CheckUtil .notEmpty (tokens , "Tokens" );
0 commit comments