-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the bingo data endpoint (#520)
- Loading branch information
1 parent
1862d9e
commit 5ed57ca
Showing
4 changed files
with
90 additions
and
0 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
33 changes: 33 additions & 0 deletions
33
hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/bingo/BingoEventData.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,33 @@ | ||
package net.hypixel.api.reply.skyblock.bingo; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.List; | ||
|
||
public class BingoEventData { | ||
private int key; | ||
private int points; | ||
@SerializedName("completed_goals") | ||
private List<String> completedGoals; | ||
|
||
public int getKey() { | ||
return key; | ||
} | ||
|
||
public int getPoints() { | ||
return points; | ||
} | ||
|
||
public List<String> getCompletedGoals() { | ||
return completedGoals; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BingoEventData{" + | ||
"key=" + key + | ||
", points=" + points + | ||
", completedGoals=" + completedGoals + | ||
'}'; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...l-api-core/src/main/java/net/hypixel/api/reply/skyblock/bingo/SkyBlockBingoDataReply.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,20 @@ | ||
package net.hypixel.api.reply.skyblock.bingo; | ||
|
||
import net.hypixel.api.reply.AbstractReply; | ||
|
||
import java.util.List; | ||
|
||
public class SkyBlockBingoDataReply extends AbstractReply { | ||
private List<BingoEventData> events; | ||
|
||
public List<BingoEventData> getEvents() { | ||
return events; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "SkyBlockBingoPlayerDataReply{" + | ||
"events=" + events + | ||
"} " + super.toString(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...i-example/src/main/java/net/hypixel/api/example/skyblock/GetSkyBlockBingoDataExample.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 net.hypixel.api.example.skyblock; | ||
|
||
import net.hypixel.api.example.ExampleUtil; | ||
|
||
public class GetSkyBlockBingoDataExample { | ||
public static void main(String[] args) { | ||
ExampleUtil.API.getSkyblockBingoData(ExampleUtil.HYPIXEL).whenComplete(ExampleUtil.getTestConsumer()); | ||
ExampleUtil.await(); | ||
} | ||
} |