-
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
24 changed files
with
637 additions
and
64 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/PvPMonthlyProfile.java
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly; | ||
|
||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
|
||
public class PvPMonthlyProfile extends RoccoDevMonthlyProfile { | ||
|
||
public PvPMonthlyProfile(JObject source) { | ||
super(source); | ||
} | ||
|
||
public long getKills() { | ||
return source.getLong("kills"); | ||
} | ||
|
||
public long getDeaths() { | ||
return source.getLong("deaths"); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/RoccoDevMonthlyProfile.java
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly; | ||
|
||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
|
||
public class RoccoDevMonthlyProfile extends MonthlyProfile { | ||
|
||
public RoccoDevMonthlyProfile(JObject source) { | ||
super(source); | ||
} | ||
|
||
@Override | ||
public long getPoints() { | ||
return source.getLong("points"); | ||
} | ||
|
||
@Override | ||
public long getPlace() { | ||
return source.getLong("place"); | ||
} | ||
|
||
public String getUsername() { | ||
return source.getString("username"); | ||
} | ||
|
||
|
||
} |
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
36 changes: 36 additions & 0 deletions
36
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/bp/BpMonthlyLeaderboard.java
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.bp; | ||
|
||
import org.json.simple.JSONObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.monthly.MonthlyLeaderboard; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.LazyObject; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class BpMonthlyLeaderboard extends MonthlyLeaderboard { | ||
|
||
private JObject source; | ||
|
||
public BpMonthlyLeaderboard(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
@Override | ||
public List<BpMonthlyProfile> getProfiles() { | ||
if(source instanceof LazyObject) ((LazyObject)source).fetch(); | ||
|
||
List<BpMonthlyProfile> profiles = new ArrayList<>(); | ||
|
||
JSONObject rawData = source.getInput(); | ||
for(Object profile : rawData.entrySet()) { | ||
Map.Entry<String, JSONObject> entry = (Map.Entry<String, JSONObject>) profile; | ||
|
||
profiles.add(new BpMonthlyProfile(new JObject(entry.getValue()))); | ||
} | ||
|
||
return profiles; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/bp/BpMonthlyProfile.java
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.bp; | ||
|
||
import pw.roccodev.beezig.hiveapi.wrapper.monthly.RoccoDevMonthlyProfile; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
|
||
public class BpMonthlyProfile extends RoccoDevMonthlyProfile { | ||
|
||
private JObject source; | ||
|
||
public BpMonthlyProfile(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
public long getVictories() { | ||
return source.getLong("victories"); | ||
} | ||
|
||
public long getGamesPlayed() { | ||
return source.getLong("played"); | ||
} | ||
|
||
public long getPlacings() { | ||
return source.getLong("placings"); | ||
} | ||
|
||
public long getEliminations() { | ||
return source.getLong("eliminations"); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/cai/CaiMonthlyLeaderboard.java
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.cai; | ||
|
||
import org.json.simple.JSONObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.monthly.MonthlyLeaderboard; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.LazyObject; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class CaiMonthlyLeaderboard extends MonthlyLeaderboard { | ||
|
||
private JObject source; | ||
|
||
public CaiMonthlyLeaderboard(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
@Override | ||
public List<CaiMonthlyProfile> getProfiles() { | ||
if(source instanceof LazyObject) ((LazyObject)source).fetch(); | ||
|
||
List<CaiMonthlyProfile> profiles = new ArrayList<>(); | ||
|
||
JSONObject rawData = source.getInput(); | ||
for(Object profile : rawData.entrySet()) { | ||
Map.Entry<String, JSONObject> entry = (Map.Entry<String, JSONObject>) profile; | ||
|
||
profiles.add(new CaiMonthlyProfile(new JObject(entry.getValue()))); | ||
} | ||
|
||
return profiles; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/cai/CaiMonthlyProfile.java
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.cai; | ||
|
||
import pw.roccodev.beezig.hiveapi.wrapper.monthly.RoccoDevMonthlyProfile; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
|
||
public class CaiMonthlyProfile extends RoccoDevMonthlyProfile { | ||
|
||
private JObject source; | ||
|
||
public CaiMonthlyProfile(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
public long getVictories() { | ||
return source.getLong("victories"); | ||
} | ||
|
||
public long getGamesPlayed() { | ||
return source.getLong("played"); | ||
} | ||
|
||
public long getCaptures() { | ||
return source.getLong("captures"); | ||
} | ||
|
||
public long getCaught() { | ||
return source.getLong("caught"); | ||
} | ||
|
||
} |
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
36 changes: 36 additions & 0 deletions
36
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/gnt/GntMonthlyLeaderboard.java
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.gnt; | ||
|
||
import org.json.simple.JSONObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.monthly.MonthlyLeaderboard; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.LazyObject; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class GntMonthlyLeaderboard extends MonthlyLeaderboard { | ||
|
||
private JObject source; | ||
|
||
public GntMonthlyLeaderboard(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
@Override | ||
public List<GntMonthlyProfile> getProfiles() { | ||
if(source instanceof LazyObject) ((LazyObject)source).fetch(); | ||
|
||
List<GntMonthlyProfile> profiles = new ArrayList<>(); | ||
|
||
JSONObject rawData = source.getInput(); | ||
for(Object profile : rawData.entrySet()) { | ||
Map.Entry<String, JSONObject> entry = (Map.Entry<String, JSONObject>) profile; | ||
|
||
profiles.add(new GntMonthlyProfile(new JObject(entry.getValue()))); | ||
} | ||
|
||
return profiles; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/gnt/GntMonthlyProfile.java
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.gnt; | ||
|
||
import pw.roccodev.beezig.hiveapi.wrapper.monthly.PvPMonthlyProfile; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
|
||
public class GntMonthlyProfile extends PvPMonthlyProfile { | ||
|
||
private JObject source; | ||
|
||
public GntMonthlyProfile(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
public long getVictories() { | ||
return source.getLong("victories"); | ||
} | ||
|
||
public long getGamesPlayed() { | ||
return source.getLong("played"); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/gnt/GntmMonthlyLeaderboard.java
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.gnt; | ||
|
||
import org.json.simple.JSONObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.LazyObject; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class GntmMonthlyLeaderboard extends GntMonthlyLeaderboard { | ||
|
||
private JObject source; | ||
|
||
public GntmMonthlyLeaderboard(JObject source) { | ||
super(source); | ||
this.source = source; | ||
} | ||
|
||
@Override | ||
public List<GntMonthlyProfile> getProfiles() { | ||
if(source instanceof LazyObject) ((LazyObject)source).fetch(); | ||
|
||
List<GntMonthlyProfile> profiles = new ArrayList<>(); | ||
|
||
JSONObject rawData = source.getInput(); | ||
for(Object profile : rawData.entrySet()) { | ||
Map.Entry<String, JSONObject> entry = (Map.Entry<String, JSONObject>) profile; | ||
|
||
profiles.add(new GntmMonthlyProfile(new JObject(entry.getValue()))); | ||
} | ||
|
||
return profiles; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/pw/roccodev/beezig/hiveapi/wrapper/monthly/gnt/GntmMonthlyProfile.java
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package pw.roccodev.beezig.hiveapi.wrapper.monthly.gnt; | ||
|
||
import pw.roccodev.beezig.hiveapi.wrapper.utils.json.JObject; | ||
|
||
public class GntmMonthlyProfile extends GntMonthlyProfile { | ||
|
||
public GntmMonthlyProfile(JObject source) { | ||
super(source); | ||
} | ||
} |
Oops, something went wrong.