From ee84a09894c450c35ac619cd3870b3887059985d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:34:43 +0200 Subject: composter fix (#50) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/utils/MayorData.java | 77 ---------------------- .../skyhanni/utils/jsonobjects/GardenJson.java | 14 ++++ .../skyhanni/utils/jsonobjects/MayorJson.java | 77 ++++++++++++++++++++++ 3 files changed, 91 insertions(+), 77 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/utils/MayorData.java create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/MayorJson.java (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MayorData.java b/src/main/java/at/hannibal2/skyhanni/utils/MayorData.java deleted file mode 100644 index 1c73572d4..000000000 --- a/src/main/java/at/hannibal2/skyhanni/utils/MayorData.java +++ /dev/null @@ -1,77 +0,0 @@ -package at.hannibal2.skyhanni.utils; - -import com.google.gson.annotations.Expose; - -import java.util.ArrayList; - -public class MayorData { - @Expose - public boolean success; - @Expose - public long lastUpdated; - @Expose - public Mayor mayor; - @Expose - public Election current; - - public class Candidate { - @Expose - public String key; - @Expose - public String name; - @Expose - public ArrayList perks; - @Expose - public int votes; - - @Override - public String toString() { - return "Candidate{" + - "key='" + key + '\'' + - ", name='" + name + '\'' + - ", perks=" + perks + - ", votes=" + votes + - '}'; - } - } - -// public class Current { -// @Expose -// public int year; -// @Expose -// public ArrayList candidates; -// } - - public class Election { - @Expose - public int year; - @Expose - public ArrayList candidates; - } - - public class Mayor { - @Expose - public String key; - @Expose - public String name; - @Expose - public ArrayList perks; - @Expose - public Election election; - } - - public class Perk { - @Expose - public String name; - @Expose - public String description; - - @Override - public String toString() { - return "Perk{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } - } -} \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java new file mode 100644 index 000000000..0a5a76c43 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/GardenJson.java @@ -0,0 +1,14 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import com.google.gson.annotations.Expose; + +import java.util.Map; + +public class GardenJson { + + @Expose + public Map organic_matter; + + @Expose + public Map fuel; +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/MayorJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/MayorJson.java new file mode 100644 index 000000000..813020bc1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/MayorJson.java @@ -0,0 +1,77 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import com.google.gson.annotations.Expose; + +import java.util.ArrayList; + +public class MayorJson { + @Expose + public boolean success; + @Expose + public long lastUpdated; + @Expose + public Mayor mayor; + @Expose + public Election current; + + public class Candidate { + @Expose + public String key; + @Expose + public String name; + @Expose + public ArrayList perks; + @Expose + public int votes; + + @Override + public String toString() { + return "Candidate{" + + "key='" + key + '\'' + + ", name='" + name + '\'' + + ", perks=" + perks + + ", votes=" + votes + + '}'; + } + } + +// public class Current { +// @Expose +// public int year; +// @Expose +// public ArrayList candidates; +// } + + public class Election { + @Expose + public int year; + @Expose + public ArrayList candidates; + } + + public class Mayor { + @Expose + public String key; + @Expose + public String name; + @Expose + public ArrayList perks; + @Expose + public Election election; + } + + public class Perk { + @Expose + public String name; + @Expose + public String description; + + @Override + public String toString() { + return "Perk{" + + "name='" + name + '\'' + + ", description='" + description + '\'' + + '}'; + } + } +} \ No newline at end of file -- cgit