Class HardyBarthApi


  • public class HardyBarthApi
    extends java.lang.Object
    Implements the Hardy Barth Api.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonElement sendGetRequest​(java.lang.String endpoint)
      Sends a get request to the Hardy Barth.
      com.google.gson.JsonObject sendPutRequest​(java.lang.String endpoint, java.lang.String key, java.lang.String value)
      Sends a get request to the Hardy Barth.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HardyBarthApi

        public HardyBarthApi​(java.lang.String ip,
                             HardyBarthImpl hardyBarthImpl)
    • Method Detail

      • sendPutRequest

        public com.google.gson.JsonObject sendPutRequest​(java.lang.String endpoint,
                                                         java.lang.String key,
                                                         java.lang.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 @throws
        key - The key in the properties
        value - The value of the key property
        Returns:
        A JsonObject
        Throws:
        OpenemsError.OpenemsNamedException - on error