From ac6f7ef4f127133f605c6efc3e8d30f2d0c44dab Mon Sep 17 00:00:00 2001 From: Andre601 <11576465+Andre601@users.noreply.github.com> Date: Wed, 21 Jul 2021 21:31:39 +0200 Subject: [PATCH 1/2] Add 5 new Sites --- build.gradle | 2 +- .../botblock/javabotblockapi/core/Info.java | 2 +- .../botblock/javabotblockapi/core/Site.java | 64 +++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 568e8d1..a669e74 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins{ id 'com.github.johnrengelman.shadow' version '5.2.0' } -def ver = new Version(major: 6, minor: 7, patch: 1) +def ver = new Version(major: 6, minor: 7, patch: 2) allprojects { apply plugin: 'maven-publish' diff --git a/core/src/main/java/org/botblock/javabotblockapi/core/Info.java b/core/src/main/java/org/botblock/javabotblockapi/core/Info.java index 17d26ff..d4013a2 100644 --- a/core/src/main/java/org/botblock/javabotblockapi/core/Info.java +++ b/core/src/main/java/org/botblock/javabotblockapi/core/Info.java @@ -39,7 +39,7 @@ public class Info{ /** * Patch version of the Wrapper. */ - public static final int PATCH = 1; + public static final int PATCH = 2; /** * Full version in the format {@code major.minor.patch}. diff --git a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java index 2e39237..0bfda4c 100644 --- a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java +++ b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java @@ -80,6 +80,19 @@ public class Site{ */ public static final Site BOATSPACE_XYZ = new Site("boatspace.xyz", HttpMethod.GET, HttpMethod.POST); + /** + * botlist.me + * + *

Supported methods: + *

+ * + * @since 6.7.2 + */ + public static final Site BOTLIST_ME = new Site("botlist.me", HttpMethod.GET, HttpMethod.POST); + /** * bots.discordlabs.org * @@ -245,6 +258,19 @@ public class Site{ */ public static final Site INFINITYBOTLIST_XYZ = new Site("infinitybotlist.xyz", HttpMethod.GET, HttpMethod.POST); + /** + * motiondevelopment.top + * + *

Supported methods: + *

+ * + * @since 6.7.2 + */ + public static final Site MOTIONDEVELOPMENT_TOP = new Site("motiondevelopment.top", HttpMethod.GET, HttpMethod.POST); + /** * paradisebots.net * @@ -258,6 +284,19 @@ public class Site{ */ public static final Site PARADISEBOTS_NET = new Site("paradisebots.net", HttpMethod.GET, HttpMethod.POST); + /** + * radarbotdirectory.xyz + * + *

Supported methods: + *

+ * + * @since 6.7.2 + */ + public static final Site RADARBOTDIRECTORY_XYZ = new Site("radarbotdirectory.xyz", HttpMethod.GET, HttpMethod.POST); + /** * space-bot-list.xyz * @@ -269,6 +308,18 @@ public class Site{ */ public static final Site SPACE_BOT_LIST_XYZ = new Site("space-bot-list.xyz", HttpMethod.GET, HttpMethod.POST); + /** + * stellarbotlist.com + * + *

Supported methods: + *

+ * + * @since 6.7.2 + */ + public static final Site STELLARBOTLIST_COM = new Site("stellarbotlist.com", HttpMethod.GET); + /** * topcord.xyz * @@ -280,6 +331,19 @@ public class Site{ */ public static final Site TOPCORD_XYZ = new Site("topcord.xyz", HttpMethod.GET, HttpMethod.POST); + /** + * vcodes.xyz + * + *

Supported methods: + *

+ * + * @since 6.7.2 + */ + public static final Site VCODES_XYZ = new Site("vcodes.xyz", HttpMethod.GET, HttpMethod.POST); + /** * voidbots.net * From 3fc5abfe42c9a7f4bce9193d31a4513d439fd1ea Mon Sep 17 00:00:00 2001 From: Andre601 <11576465+Andre601@users.noreply.github.com> Date: Wed, 21 Jul 2021 21:38:38 +0200 Subject: [PATCH 2/2] Add and improve Javadoc comments --- .../main/java/org/botblock/javabotblockapi/core/Site.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java index 0bfda4c..9245d6b 100644 --- a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java +++ b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java @@ -392,7 +392,7 @@ private Site(String name){ /** * The name used by the BotBlock API to identify the site. - *
The name usually is just the domain of the site without the http(s):// in front of it. + *
The name usually represents the domain of the bot list without the https in front of it. * * @return The name of the site used for the BotBlock API. */ @@ -418,6 +418,12 @@ public boolean supportsPost(){ return !methods.isEmpty() && methods.contains(HttpMethod.POST); } + /** + * Nested enum for the Http-methods supported by the bot lists. + * + *

Depending on what Http-Methods a bot list supports can its corresponding entry be used for the GET methods, + * POST methods or both. + */ public enum HttpMethod{ /** * Bot list supports GET requests.