Skip to content
/ JCA Public

Provides an opportunity to use the API functionality of the Clash Of Clans game

License

Notifications You must be signed in to change notification settings

Vitalij3/JCA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maven-central GitHub last commit GitHub

Downloads

Due to my lack of knowledge, my maven repository began to feel bad, and there are many versions hanging on it, which are difficult to call versions because nothing has changed in them. Starting with version 1.3.1 you can safely use my library. From all this I want to conclude that I will try not to create problems for myself and improve the quality of my development :)

Maven:

<dependency>
    <groupId>io.github.vitalij3</groupId>
    <artifactId>Java-Clash-API</artifactId>
    <version>VERSION</version>
</dependency>

Gradle:

implementation 'io.github.vitalij3:Java-Clash-API:VERSION'

Example code

package com.example;

import io.github.vitalij3.JCA.ClashApi;
import io.github.vitalij3.JCA.exception.api.ClashOfClansApiException;
import io.github.vitalij3.JCA.models.locations.Location;

public class Demo {
    public static void main(String[] args) throws ClashOfClansApiException {

        // creating instance
        ClashApi clashApi = new ClashApi("token");

        // getting locations list
        Location.Item location = clashApi.getLocations().get(1);

        // getting player rankings list and writing in console
        clashApi.getRankingsPlayersVersus(location.id).forEach(player -> System.out.println(player.name + " -> " + player.tag));
    }
}