summaryrefslogtreecommitdiff
path: root/src/io/Response.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/Response.java')
-rw-r--r--src/io/Response.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/io/Response.java b/src/io/Response.java
new file mode 100644
index 0000000..5cc36e1
--- /dev/null
+++ b/src/io/Response.java
@@ -0,0 +1,42 @@
+package io;
+
+import com.google.gson.JsonElement;
+
+/**
+ * A response object with the Jsonelement and rate limit values.
+ *
+ * @author Maurice Laveaux
+ */
+public class Response {
+
+ private final JsonElement element;
+
+ private final int rateLimitReset;
+
+ private final int rateLimitRemaining;
+
+ private final int rateLimit;
+
+ public Response(JsonElement resp, int rateLimit, int rateLimitRemaining, int rateLimitReset) {
+ this.element = resp;
+ this.rateLimit = rateLimit;
+ this.rateLimitRemaining = rateLimitRemaining;
+ this.rateLimitReset = rateLimitReset;
+ }
+
+ public JsonElement getResp() {
+ return element;
+ }
+
+ public int getRateLimit() {
+ return this.rateLimit;
+ }
+
+ public int getRateLimitRemaining() {
+ return this.rateLimitRemaining;
+ }
+
+ public int getRateLimitReset() {
+ return this.rateLimitReset;
+ }
+}