From 56ed260b238d1922ccea7f5a9a27dc66c7c4bbdb Mon Sep 17 00:00:00 2001 From: LordTuxn <64250550+LordTuxn@users.noreply.github.com> Date: Tue, 1 Dec 2020 00:08:30 +0100 Subject: [PATCH] Update README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1013b10..4b35df6 100644 --- a/README.md +++ b/README.md @@ -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, List of all Questions / Key: *ID*, Value: *Question* +* `Answers`: Map, List of all Answers / Key: *ID*, Value: *Answer* + +``` +List applicationsByMember = bte.getApplicationsByMember(bte.getMembers().getMemberByID("285480119575904256")); + +List pendingApplications = bte.getPendingApplications(); +```