0.0.1.6bis
This commit is contained in:
1 parent
c6c7b99334
commit
97649d73eb
135 files changed
+2283
-6075
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,7 @@ package org.sillyjirafe.uoapi;
|
||||
import java.util.List;
|
||||
|
||||
public interface Api {
|
||||
String getURL(int page, String apiKey);
|
||||
String getURL(int page, String apiKey, String rnd);
|
||||
public List<element> Parse(String JsonRaw);
|
||||
String getName();
|
||||
}
|
||||
@@ -7,12 +7,12 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
|
||||
public class Caller {
|
||||
public static List<element> CallApi(Api api, int page, String apiKey) throws Exception
|
||||
public static List<element> CallApi(Api api, int page, String apiKey, String rnd) throws Exception
|
||||
{
|
||||
HttpClient client = HttpClient.newHttpClient();
|
||||
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create(api.getURL(page, apiKey)))
|
||||
.uri(URI.create(api.getURL(page, apiKey, rnd)))
|
||||
.GET()
|
||||
.build();
|
||||
|
||||
|
||||
Reference in new issue
Block a user