Worker interface method definitions

This commit is contained in:
Nicolás Sánchez 2024-12-19 09:27:27 -03:00
parent 6765549d5b
commit b15fdcd951
2 changed files with 83 additions and 2 deletions

View File

@ -27,8 +27,6 @@ public class InstanceInterface {
private static final OkHttpClient httpClient = new OkHttpClient(); private static final OkHttpClient httpClient = new OkHttpClient();
public static ProfitStatsData getProfitStatsData(boolean retry) throws IOException { public static ProfitStatsData getProfitStatsData(boolean retry) throws IOException {
int retries = 3;
Request profitRequest = new Request.Builder() Request profitRequest = new Request.Builder()
.url(API_BASE_URL + "/statistics_server/combined_totals") .url(API_BASE_URL + "/statistics_server/combined_totals")
.header("X-API-KEY", API_KEY) .header("X-API-KEY", API_KEY)

View File

@ -0,0 +1,83 @@
package com.example.dcav2gui;
import static com.example.dcav2gui.MainActivity.globalSettings;
import java.io.IOException;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import okhttp3.OkHttpClient;
public class WorkerInterface {
private static final String API_BASE_URL = globalSettings.apiUrl;
private static final String API_KEY = globalSettings.apiKey;
private static final OkHttpClient httpClient = new OkHttpClient();
public static WorkerDetails getWorkerDetails(String pair) throws IOException {
return null;
}
public static JsonObject addTrader(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject removeTrader(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject restartTrader(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject importTrader(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject togglePause(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject toggleAutoswitch(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject toggleCleanup(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject toggleLastCall(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject switchToLong(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject switchToShort(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject switchQuoteCurrency(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject addSafetyOrders(String exchange, String pair) throws IOException {
return null;
}
public static JsonObject addQuote(String exchange, String pair) throws IOException {
return null;
}
public static class WorkerDetails {
}
}