summaryrefslogtreecommitdiff
path: root/src/io/Requester.java
diff options
context:
space:
mode:
authorMaurice Laveaux <m.laveaux@student.tue.nl>2014-05-22 09:02:50 +0200
committerMaurice Laveaux <m.laveaux@student.tue.nl>2014-05-22 09:02:50 +0200
commit0c07b1d1a83ab20b4c753c40ea8048f73b3e5745 (patch)
tree47db3723c190bdb264a144b500fb6f41b2f1559f /src/io/Requester.java
parent4e0fcd499a14cfc621b256f4a28f0cafe22bfc8c (diff)
downloadTwitterDataAnalytics-0c07b1d1a83ab20b4c753c40ea8048f73b3e5745.tar.gz
Changed Request response to a new Response class.
* Response contains the JsonElement, tickrate, reset and leftover data. * Removed getJsonRelaxed, because it was not used elsewhere.
Diffstat (limited to 'src/io/Requester.java')
-rw-r--r--src/io/Requester.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/io/Requester.java b/src/io/Requester.java
index 7f09a48..3dd09f3 100644
--- a/src/io/Requester.java
+++ b/src/io/Requester.java
@@ -1,5 +1,6 @@
package io;
+import com.google.gson.JsonElement;
import java.io.IOException;
import org.json.JSONObject;
@@ -20,18 +21,7 @@ public interface Requester {
* @return A JSON object resulting from the request.
* @throws java.io.IOException on error fetching the resource.
*/
- public JSONObject getJSON(String resource) throws IOException;
-
- /**
- * Almost equivalent to {@code getJSON(resource, true)}, except that an
- * IOException is not thrown if the request reports an non-successful status
- * code.
- *
- * @see Requester#getJSON(java.lang.String, boolean)
- * @throws IOException on network errors or if the response could not be
- * parsed into a valid JSONObject.
- */
- public JSONObject getJSONRelax(String resource) throws IOException;
+ public Response getJSON(String resource) throws IOException;
/**
* Tests whether this instance can dispatch requests.