Fitted ApiClient to online API

This commit is contained in:
CrushedPixel
2015-05-16 18:44:13 +02:00
parent f7d75cd605
commit 1c818cbaa7
3 changed files with 5 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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";

View 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