com.ubidots.Variable Maven / Gradle / Ivy
package com.ubidots;
import java.util.ArrayList;
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 Variable extends ApiObject {
Variable(Map raw, ApiClient api) {
super(raw, api);
}
public String getName() {
return getAttributeString("name");
}
public String getUnit() {
return getAttributeString("unit");
}
public String getIcon() {
return getAttributeString("icon");
}
public void remove() {
bridge.delete("variables/" + getAttributeString("id"));
}
public Value[] getValues() {
String json = bridge.get("variables/" + getAttributeString("id") + "/values");
Gson gson = new Gson();
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy