Skip to content

ReleaseException/ReleaseNetworksAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ReleaseClientAuth

For the authentication for the player who uses our client we have our own backend thats based on JavaScript. You can use the following snippets to get access to certain data of our ReleaseClient.

BaseContent

At the beginning we're offering an pretty simple method to get the content of the given page.

    public static String getSiteContent(String url) throws Exception {
        StringBuilder result = new StringBuilder();
        try {
            HttpURLConnection urlConnection = (HttpURLConnection) new URL(url).openConnection();
            urlConnection.setRequestMethod("GET");
            BufferedReader reader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
            String content;
            while ((content = reader.readLine()) != null) {
                result.append(content);
            }
            reader.close();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
        return result.toString();
    }

Client versions

At the moment there are three different verions of the ReleaseClient: legacy, latest, canary. You get the version of an type by using the method below, you can use to get information about the client that the player is using.

    public static String getVersionByType(String type) {
        String result = "";
        try {
            String content = getHTML("http://releaseteam.de/api/client");
            JsonObject json = new JsonParser().parse(content).getAsJsonObject();
            result = json.get("type").getAsString();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
        return result;
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages