APISonar


org.openhab.binding.digitalstrom.internal.lib.serverconnection.simpledsrequestbuilder.constants.InterfaceKeys.JSON

> org > openhab > binding > digitalstrom > internal > lib > serverconnection > simpledsrequestbuilder > constants > InterfaceKeys > JSON
org APIs openhab APIs binding APIs digitalstrom APIs internal APIs lib APIs serverconnection APIs simpledsrequestbuilder APIs constants APIs InterfaceKeys APIs JSON APIs

Example 1
public static SimpleRequestBuilder buildNewJsonRequest(String requestClassKey)
            throws NullArgumentException, IllegalArgumentException {
        return buildNewRequest(InterfaceKeys.JSON).addRequestClass(requestClassKey);
    }
Example 2
public boolean zoneBlink(String sessionToken, Integer zoneID, String zoneName, Short groupID, String groupName) {
        if (checkRequiredZone(zoneID, zoneName)) {
            String response = transport.execute(SimpleRequestBuilder.buildNewRequest(InterfaceKeys.JSON)
                    .addRequestClass(ClassKeys.ZONE).addFunction(FunctionKeys.BLINK)
                    .addDefaultZoneGroupParameter(sessionToken, zoneID, zoneName, groupID, groupName)
                    .buildRequestString());
            JsonObject responseObj = JSONResponseHandler.toJsonObject(response);

            if (JSONResponseHandler.checkResponse(responseObj)) {
                return true;
            }
        }
        return false;
    }
Example 3
public boolean turnDeviceOn(String token, DSID dsid, String dSUID, String name) {
        if (checkRequiredDevice(dsid, dSUID, name)) {
            String response = transport.execute(SimpleRequestBuilder.buildNewRequest(InterfaceKeys.JSON)
                    .addRequestClass(ClassKeys.DEVICE).addFunction(FunctionKeys.TURN_ON)
                    .addDefaultDeviceParameter(token, dsid, dSUID, name).buildRequestString());
            return JSONResponseHandler.checkResponse(JSONResponseHandler.toJsonObject(response));
        }
        return false;
    }