Skeleton EarnerInterface
This commit is contained in:
parent
8bc3fe4cfc
commit
f4ea96d322
|
|
@ -1,4 +1,40 @@
|
||||||
package com.example.dcav2gui;
|
package com.example.dcav2gui;
|
||||||
|
|
||||||
|
import static com.example.dcav2gui.MainActivity.globalSettings;
|
||||||
|
|
||||||
|
import com.example.dcav2gui.ui.earners.EarnerData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
|
||||||
public class EarnerInterface {
|
public class EarnerInterface {
|
||||||
|
|
||||||
|
private static final String API_BASE_URL = globalSettings.apiUrl;
|
||||||
|
private static final String API_KEY = globalSettings.earnApiKey;
|
||||||
|
private static final OkHttpClient httpClient = new OkHttpClient();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Implement API calls
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public static class EarnerGlobalData {
|
||||||
|
private final double uptime;
|
||||||
|
private final List<EarnerData> earnerList;
|
||||||
|
|
||||||
|
public EarnerGlobalData(double uptime, List<EarnerData> earnerList) {
|
||||||
|
this.uptime = uptime;
|
||||||
|
this.earnerList = earnerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getUptime() {
|
||||||
|
return uptime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<EarnerData> getEarnerList() {
|
||||||
|
return earnerList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue