This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,52 @@ | ||
# BTE-Web-Library | ||
A simple library for BTE build team leaders. | ||
# BTE Build Team Web Library | ||
|
||
This is a simple Java library for BTE Build Team leaders. You can easily access your build team data from the https://buildtheearth.net Website. | ||
My library uses the [Build Team API](https://github.com/BuildTheEarth/build-team-api/) by [Xesau](https://github.com/Xesau). | ||
|
||
To get started, have a look at the examples. It's my first library, so if you find any issue, please contact me! :) | ||
|
||
## Current Features | ||
|
||
- [x] **Members** (Access DiscordID, DiscordName, DiscordTag and Role of a member) | ||
- [x] **Applications** (Access to pending applications and applications of a member) | ||
- [ ] **Locations** (Access all locations of your build team) | ||
- [ ] **Regions** (Access all claimed plots of a location of your build team) | ||
|
||
## Examples | ||
|
||
### Getting Started | ||
|
||
Import *BTEWebLibrary* and pass your Build Team API-Key as parameter. | ||
``` | ||
BTEWebLibrary bte = new BTEWebLibrary("API-KEY"); | ||
``` | ||
|
||
### Get Member(s) | ||
|
||
**Structure** | ||
* `ID`: Integer, Member ID from the BTE Website (The API currently doesn't provide this) | ||
* `DiscordID`: Long, Discord ID | ||
* `DiscordName`: String, Discord Name without Tag (#9999) | ||
* `DiscordTag`: Integer, Discord Discriminator | ||
* `Role`: Roles, Builder / Reviewer / CoLeader / Leader | ||
|
||
``` | ||
bte.getMembers().getMemberByID("285480119575904256"); | ||
bte.getMembers().getMemberByName("R3tuxn"); | ||
bte.getMembers().getMembersByRole(Roles.Builder); | ||
``` | ||
|
||
### Get Application(s) | ||
|
||
**Structure** | ||
* `ID`: Integer, Application ID from the BTE Website | ||
* `Questions`: Map<String,String>, List of all Questions / Key: *ID*, Value: *Question* | ||
* `Answers`: Map<String,String>, List of all Answers / Key: *ID*, Value: *Answer* | ||
|
||
``` | ||
List<Application> applicationsByMember = bte.getApplicationsByMember(bte.getMembers().getMemberByID("285480119575904256")); | ||
List<Application> pendingApplications = bte.getPendingApplications(); | ||
``` |