summaryrefslogtreecommitdiff
path: root/src/io/Response.java
blob: 92b0f0ca0b3bb79e4da2a8d9607e73b2fc19d757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 getJson() {
        return element;
    }

    public int getRateLimit() {
        return this.rateLimit;
    }

    public int getRateLimitRemaining() {
        return this.rateLimitRemaining;
    }

    public int getRateLimitReset() {
        return this.rateLimitReset;
    }
}