diff --git a/.github/workflows/gen_javadocs.yml b/.github/workflows/gen_javadocs.yml new file mode 100644 index 0000000..5fb91ee --- /dev/null +++ b/.github/workflows/gen_javadocs.yml @@ -0,0 +1,27 @@ +name: Build Javadocs + +on: + workflow_dispatch: + +jobs: + generateJavadoc: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2.3.4 + with: + ref: 'master' + - name: Set up Java 11 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '11' + - name: Generate Javadoc + run: ./gradlew javadoc + - name: Push changes + uses: peaceiris/actions-gh-pages@v3.8.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + commit_message: "Update Docs" + enable_jekyll: true diff --git a/build.gradle b/build.gradle index c285608..4a8ede9 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: 3) +def ver = new Version(major: 6, minor: 7, patch: 4) 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 8fe8eaf..b60d658 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 = 3; + public static final int PATCH = 4; /** * 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 10f183c..5f543c3 100644 --- a/core/src/main/java/org/botblock/javabotblockapi/core/Site.java +++ b/core/src/main/java/org/botblock/javabotblockapi/core/Site.java @@ -18,6 +18,9 @@ package org.botblock.javabotblockapi.core; +import org.botblock.javabotblockapi.core.annotations.DeprecatedSince; +import org.botblock.javabotblockapi.core.annotations.PlannedRemoval; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -112,8 +115,13 @@ public class Site{ *
  • GET
  • *
  • POST
  • * + * + * @deprecated List was aquired by {@link #DISCORDS_COM discords.com} */ - public static final Site BOTSFORDISCORD_COM = new Site("botsfordiscord.com", HttpMethod.GET, HttpMethod.POST); + @Deprecated + @DeprecatedSince(major = 6, minor = 7, patch = 4, replacements = "DISCORDS_COM") + @PlannedRemoval(major = 6, minor = 7, patch = 6) + public static final Site BOTSFORDISCORD_COM = new Site("botsfordiscord.com"); /** * bots.ondiscord.xyz @@ -214,6 +222,17 @@ public class Site{ */ public static final Site DISCORDLIST_SPACE = new Site("discordlist.space", HttpMethod.GET, HttpMethod.POST); + /** + * discords.com formerly botsfordiscord.com + * + *

    Supported methods: + *

    + */ + public static final Site DISCORDS_COM = new Site("discords.com", HttpMethod.GET, HttpMethod.POST); + /** * discordservices.net * diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 0b7a14e..0000000 --- a/docs/index.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JavaBotBlockAPI | Java Wrapper for the BotBlock API - - - - - - - - - - - -
    -
    -
    -
    -
    -

    JavaBotBlockAPI

    -
    -
    -
    -
    -
    -
    -
    -

    About

    -

    JavaBotBlockAPI is the official Java Wrapper for the BotBlock API. -
    It supports all GET and POST requests that the BotBlock API offers. - -

    Modules

    -

    The Wrapper is split up into different modules to allow you more control about what you need. -
    Current modules incude: -

      -
    • Core The main module needed for everything else.
    • -
    • Javacord Module to add support for the Javacord Library
    • -
    • JDA Module to add support for the JDA Library
    • -
    • Request Module for GET and POST requests from/to the BotBlock API. Javacord and JDA Module depend on this.
    • -
    - -

    Support

    -

    If you require support with this Wrapper, join Andre's Support Server. -
    For help regarding the BotBlock API itself should you join the BotBlock Discord Server. -
    The BotBlock Discord also has a #api Channel where you can ask for support regarding this wrapper. - -

    Do NOT contact (Ping or DM) BotBlock Staff for questions regarding this wrapper! -

    -
    -
    -
    -
    -
    -
    - -
    - - - - \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..9691e9b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,75 @@ +# JavaBotBlockAPI +A Java Wrapper for the BotBlock.org API, supporting all API endpoints of it. + +## Javadocs +Below can you find Javadocs for each module. + +- [Core](https://docs.botblock.org/JavaBotBlockAPI/core/) +- [Javacord](https://docs.botblock.org/JavaBotBlockAPI/javacord/org/botblock/javabotblockapi/javacord/package-summary.html) +- [JDA](https://docs.botblock.org/JavaBotBlockAPI/jda/org/botblock/javabotblockapi/jda/package-summary.html) +- [Request](https://docs.botblock.org/JavaBotBlockAPI/request/org/botblock/javabotblockapi/requests/package-summary.html) + +## Installation +Please replace `{version}` with the latest build available on [CodeMC](https://ci.codemc.io/job/botblock/job/JavaBotBlockAPI/). + +### Gradle +```groovy +repositories{ + maven{ url = 'https://repo.codemc.io/repository/maven-public' } +} + +dependencies{ + // The Core and Request modules are always required. + compile group: 'org.botblock', name: 'javabotblockapi-core', version: '{version}' + compile group: 'org.botblock', name: 'javabotblockapi-request', version: '{version}' + + // Javacord module for direct support with Javacord. + compile group: 'org.botblock', name: 'javabotblockapi-javacord', version: '{version}' + + // JDA module for direct support with JDA. + compile group: 'org.botblock', name: 'javabotblockapi-jda', version: '{version}' +} +``` + +### Maven +```xml + + + codemc + https://repo.codemc.io/repository/maven-public/ + + + + + + + org.botblock + javabotblockapi-core + {version} + + + + org.botblock + javabotblockapi-request + {version} + + + + org.botblock + javabotblockapi-javacord + {version} + + + + org.botblock + javabotblockapi-jda + {version} + + +``` + +## Links + +- [BotBlock Documentation](https://botblock.org/docs) +- [BotBlock Discord](https://botblock.org/discord) (**Do NOT ask BotBlock-Staff for help with this API Wrapper**) +- [Andre's Support Discord](https://discord.gg/6dazXp6) (Ask in the `#javabotblockapi` channel)