Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/jwkerr/emcapiclient
- Owner: jwkerr
- Created: 2024-03-27T02:52:15.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-07-26T13:56:23.000Z (5 months ago)
- Last Synced: 2024-11-07T19:23:03.535Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/EMCAPIClientReplace "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"
}
```