Skip to content

Commit

Permalink
Fix Clan Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dec4234 committed May 10, 2021
1 parent f73c55a commit 46068f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/material/clan/Clan.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Clan(long clanId) {
}

public Clan(String clanName) {
super(("https://www.bungie.net/Platform/GroupV2/Name/" + clanName.replace(" ", "%20")), source -> {
super(("https://www.bungie.net/Platform/GroupV2/Name/" + clanName.replace(" ", "%20") + "/1/?components=200"), source -> {
return source.getAsJsonObject("Response");
});
this.clanName = clanName;
Expand Down Expand Up @@ -122,7 +122,7 @@ public List<BungieUser> getAdmins() {
if (admins != null) { return admins; }

List<BungieUser> temp = new ArrayList<>();
JsonArray ja = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + clanId + "/AdminsAndFounder/?components=200").getAsJsonObject("Response").getAsJsonArray("results");
JsonArray ja = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + getClanID() + "/AdminsAndFounder/?components=200").getAsJsonObject("Response").getAsJsonArray("results");

for (JsonElement je : ja) {
temp.add(new BungieUser(je.getAsJsonObject().get("destinyUserInfo").getAsJsonObject().get("membershipId").getAsString()));
Expand Down Expand Up @@ -201,7 +201,7 @@ public List<BungieUser> getMembers() {
List<String> stream = new ArrayList<>();

if (jj == null) {
jj = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + clanId + "/Members/").get("Response").getAsJsonObject();
jj = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + getClanID() + "/Members/").get("Response").getAsJsonObject();
}

for (JsonElement jsonElement : jj.getAsJsonArray("results")) {
Expand Down Expand Up @@ -241,7 +241,7 @@ public List<BungieUser> getMembersOld() {
}

if (jj == null) {
jj = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + clanId + "/Members/").get("Response").getAsJsonObject();
jj = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + getClanID() + "/Members/").get("Response").getAsJsonObject();
}

for (JsonElement je : jj.getAsJsonArray("results")) {
Expand Down Expand Up @@ -295,7 +295,7 @@ public JsonObject getClanStats(ActivityMode... filter) {
*/
public Date getJoinDate(BungieUser member) {
if (jj == null) {
jj = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + clanId + "/Members/").get("Response").getAsJsonObject();
jj = hu.urlRequestGET("https://www.bungie.net/Platform/GroupV2/" + getClanID() + "/Members/").get("Response").getAsJsonObject();
}

for (JsonElement je : jj.getAsJsonArray("results")) {
Expand Down

0 comments on commit 46068f9

Please sign in to comment.