Package io.openems.edge.evcs.hardybarth
Class HardyBarthApi
java.lang.Object
io.openems.edge.evcs.hardybarth.HardyBarthApi
Implements the Hardy Barth Api.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElement
sendGetRequest
(String endpoint) Sends a get request to the Hardy Barth.com.google.gson.JsonObject
sendPutRequest
(String endpoint, String key, String value) Sends a get request to the Hardy Barth.
-
Constructor Details
-
HardyBarthApi
-
-
Method Details
-
sendGetRequest
public com.google.gson.JsonElement sendGetRequest(String endpoint) throws OpenemsError.OpenemsNamedException Sends a get request to the Hardy Barth.- Parameters:
endpoint
- the REST Api endpoint- Returns:
- a JsonObject or JsonArray
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
sendPutRequest
public com.google.gson.JsonObject sendPutRequest(String endpoint, String key, String value) throws OpenemsError.OpenemsNamedException Sends a get request to the Hardy Barth.- Parameters:
endpoint
- the REST Api endpoint @return a JsonObject or JsonArray @throws OpenemsNamedException on error @throwskey
- The key in the propertiesvalue
- The value of the key property- Returns:
- A JsonObject
- Throws:
OpenemsError.OpenemsNamedException
- on error
-