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