com.ubidots.ApiClient Maven / Gradle / Ivy
package com.ubidots;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class ApiClient {
private ServerBridge bridge;
public ApiClient(String apiKey) {
bridge = new ServerBridge(apiKey);
}
public ApiClient(String apiKey, String baseUrl) {
bridge = new ServerBridge(apiKey, baseUrl);
}
public ApiClient() {}
ServerBridge getServerBridge() {
return bridge;
}
public ApiClient fromToken(String token) {
bridge = new ServerBridge(token, true);
return this;
}
public DataSource[] getDataSources() {
String json = bridge.get("datasources");
Gson gson = new Gson();
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy