https://github.com/ranjithkris/clanjw
A Java Wrapper to access the Clash of Clans game related data using the REST API provided by the Supercell.
https://github.com/ranjithkris/clanjw
clash clash-of-clans clashapi clashofclans wrapper-api
Last synced: about 2 months ago
JSON representation
A Java Wrapper to access the Clash of Clans game related data using the REST API provided by the Supercell.
- Host: GitHub
- URL: https://github.com/ranjithkris/clanjw
- Owner: ranjithkris
- Created: 2020-03-27T19:32:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-19T20:16:42.000Z (over 4 years ago)
- Last Synced: 2025-10-31T06:02:52.311Z (8 months ago)
- Topics: clash, clash-of-clans, clashapi, clashofclans, wrapper-api
- Language: Java
- Homepage: https://ranjithmasthikatte.github.io/clanJW/
- Size: 475 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is clanJW?
[`clanJW`](https://ranjithmasthikatte.github.io/clanJW/)
is a Java Wrapper to access Clash of Clans game related data using the REST API
provided by the Supercell (https://developer.clashofclans.com/).
# How to use clanJW?
First, download the jar file from the
[`Releases`](https://github.com/ranjithmasthikatte/clanJW/releases)
and add the clanJW jar file to the your project's Build Path.
To access a Clash of Clans server, JSON Web Token is required. To get the JSON Web Token
and to know about the Clash of Clans API see (https://developer.clashofclans.com/)
To access the information related to a player, create a
`COCPlayers` object and use this object to access any
information related to a single player. To know the methods and fields see
[`clanJW`](https://ranjithmasthikatte.github.io/clanJW/)
# Example
```.java
private static final String JWTOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiIsImtpZCI6IjI4YTMxOGY3LTAwMDAtodk6ut03ZmExLTJjNzQzM2M2Y2NhNSJ9.eyJpc3MiOiJzdXBlcmNlbGwiLCJhdWQiOiJzdXBlcmNlbGw6Z2FtZWFwaSIsImp0aSI6IjliZDMwZmUyLTFiYTQtNGU2MC05MGQzLTMzYjg1OWRlOTI1NCIsImlhdCI6MTU4NTc3ODQ1NSwiufjgIjoiZGV2ZWxvcGVyLzc5Njc2MDRiLTJiNGEtNzE2Yy04Mzg5LTZkM2M3ZGU5MGQxZCIsInNjb3BlcyI6WyJjbGFzaCJdLCJsaW1pdHMiOlt7InRpZXIiOiJkZXZlbG9wZXIvc2lsdmVyIiwidHlwZSI6InRocm90dGxpngjfhSx7ImNpZHJzIjpbIjE5NC45NS4yLjI0NCJdLCJ0eXBlIjoiY2xpZW50In1dfQ.rK5nmh6e7uiv3UxsSnnxvEt-vixfg9JsHTrsJpAWjt2pUo4kULF5Oervh-nWlNDrEmEE_loZYBQf_vfQwmu-VA";
private static final String PLAYER_TAG = "#Y989RF7Z";
COCPlayers player1 = new COCPlayers(JWTOKEN, PLAYER_TAG);
System.out.println(player1.getPlayerClanName());
System.out.println(player1.getPlayerClanLargeBadgeUrl());
System.out.println(player1.getPlayerHeroName(Heroes.ARCHER_QUEEN));
System.out.println(player1.getPlayerName());
```