Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying 5.0.0 release #35

Merged
merged 7 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ tmp/
*.bak
*.swp
*~.nib
tokens.properties
local.properties
*.properties
.settings/
.loadpath
.recommenders
Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,33 @@
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/Lycoon/clash-api">
</p>

ClashAPI is a very simple yet very complete Kotlin wrapper for the Clash of Clans mobile game API. It allows developers to easily do requests to the game API without bothering about JSON and HTTP handling.
ClashAPI is a very simple yet very complete Kotlin wrapper for the Clash of Clans mobile game API.
It allows developers to easily do requests to the game API without bothering about JSON and HTTP handling.
It is intended to be lightweight and as intuitive as possible to use.

## How does it work?
I analyzed JSON responses from the Clash of Clans API to recreate the models as Java structures so you don't have to deal with deserialization and data categorization each time. You can therefore simply access game data through classes and methods, all documented!
I analyzed JSON responses from the Clash of Clans API to recreate the models as Java structures so you don't have to deal with deserialization and data categorization each time. You can therefore simply access game data through your Java/Kotlin (JVM) classes and methods, all documented!

## Setup
ClashAPI is available on Maven Central. You can add it to your project using Maven or Gradle.

### Maven
Inside your `<dependencies>` scope of your `pom.xml` file, add the following:
```xml
<dependency>
<groupId>io.github.lycoon</groupId>
<artifactId>clash-api</artifactId>
<version>5.0.0</version>
</dependency>
```

### Gradle
Inside your `dependencies` scope of your `build.gradle` file, add the following:
```gradle
implementation 'io.github.lycoon:clash-api:5.0.0'
```

## How to use it?
## Quick start
```java
// 1. Create an instance of ClashAPI by providing your Clash of Clans API token to the constructor
ClashAPI clashAPI = new ClashAPI("token");
Expand All @@ -31,9 +52,8 @@ In order to make calls to the Clash of Clans API, Supercell (developer of the ga

Though this token is linked to the IP address you gave, I would advise **not to hardcode it** inside your code, for safety sake. Paste it in a separate file that you would access from your code. It will prevent your token being spread if you ever share your files.

## Dependencies
* Kotlin serialization `1.3.1`
* OkHttp `4.9.3`
## Report bugs
You've found a bug? Let me know by opening an issue.

## Disclaimer
*This material is unofficial and is not endorsed by Supercell. For more information see Supercell's Fan Content Policy: www.supercell.com/fan-content-policy.*
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.lycoon</groupId>
<artifactId>clash-api</artifactId>
<version>4.0.0</version>
<version>5.0.0</version>

<!-- Project metadata -->
<name>${project.groupId}:${project.artifactId}</name>
Expand Down
Loading
Loading