Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jwkerr/emcapiclient

Java library for simplifying interactions with EarthMC's API
https://github.com/jwkerr/emcapiclient

Last synced: 5 days ago
JSON representation

Java library for simplifying interactions with EarthMC's API

Awesome Lists containing this project

README

        

# EMCAPIClient

# Using EMCAPIClient
Create an instance of EMCAPIClient like this
```java
EMCAPIClient api = new EMCAPIClient();
```

Every method you should be using is within this class, there are Javadocs that you can read to learn how to use the library, the method names are self-explanatory

BASIC EXAMPLE: get the data of all currently registered players and print their username
```java
public static void main(String[] args) {
EMCAPIClient api = new EMCAPIClient();

List playerIdentifiers = api.getAllPlayerIdentifiers();
List playerData = api.getPlayerDataByIdentifiers(playerIdentifiers);

int n = 1;
for (PlayerData player : playerData) {
System.out.println(n + ": " + player.getName());
n++;
}
}
```

# Adding EMCAPIClient to your project
Add EMCAPIClient to your Java project at https://jitpack.io/#jwkerr/EMCAPIClient

Replace "Tag" in the below examples with the latest Git commit hash (https://github.com/jwkerr/EMCAPIClient/commits/master/)
## Maven
```xml


jitpack.io
https://jitpack.io

```

```xml


com.github.jwkerr
EMCAPIClient
Tag

```

## Gradle
```groovy
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
```

```groovy
dependencies {
implementation "com.github.jwkerr:EMCAPIClient:Tag"
}
```