Fitted ApiClient to online API
This commit is contained in:
@@ -65,17 +65,15 @@ public class ApiClient {
|
||||
return succ.hasDonated();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public UserFiles getUserFiles(String auth, String user) throws IOException, ApiException {
|
||||
QueryBuilder builder = new QueryBuilder(ApiMethods.replay_files);
|
||||
builder.put("auth", auth);
|
||||
builder.put("user", user);
|
||||
UserFiles files = invokeAndReturn(builder, UserFiles.class);
|
||||
return files;
|
||||
//TODO if required
|
||||
return null;
|
||||
}
|
||||
|
||||
public FileInfo[] getFileInfo(List<Integer> ids) throws IOException, ApiException {
|
||||
QueryBuilder builder = new QueryBuilder(ApiMethods.replay_files);
|
||||
builder.put("ids", buildListString(ids));
|
||||
QueryBuilder builder = new QueryBuilder(ApiMethods.file_details);
|
||||
builder.put("id", buildListString(ids));
|
||||
FileInfo[] info = invokeAndReturn(builder, FileInfo[].class);
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ public class ApiMethods {
|
||||
public static final String check_authkey = "check_authkey";
|
||||
public static final String login = "login";
|
||||
public static final String logout = "logout";
|
||||
public static final String replay_files = "replay_files";
|
||||
public static final String file_details = "file_details";
|
||||
public static final String upload_file = "upload_file";
|
||||
public static final String download_file = "download_file";
|
||||
|
||||
@@ -44,7 +44,6 @@ public class SimpleApiClient {
|
||||
/**
|
||||
* Returns a Json String from the API
|
||||
*
|
||||
* @param apiKey The apikey to use
|
||||
* @param method The apiMethod to be called
|
||||
* @param paramMap The parameters to apply
|
||||
* @return A Json String from the API
|
||||
@@ -58,7 +57,6 @@ public class SimpleApiClient {
|
||||
/**
|
||||
* Returns a Json String from the API
|
||||
*
|
||||
* @param apiKey The apikey to use
|
||||
* @param method The apiMethod to be called
|
||||
* @return A Json String from the API
|
||||
* @throws IOException
|
||||
|
||||
Reference in New Issue
Block a user