Search in sources :

Example 1 with EnphaseenergyException

use of org.openhab.binding.enphaseenergy.internal.EnphaseenergyException in project openhab1-addons by openhab.

the class SystemsRequest method prepare.

public String prepare() {
    final StringBuilder urlBuilder = new StringBuilder(RESOURCE_URL);
    urlBuilder.append("/");
    urlBuilder.append(this.system_id);
    urlBuilder.append("/summary");
    urlBuilder.append("?key=");
    urlBuilder.append(this.key);
    urlBuilder.append("&user_id=");
    urlBuilder.append(this.user_id);
    try {
        return encodeQuery(urlBuilder.toString());
    } catch (final URIException e) {
        throw new EnphaseenergyException("Could not prepare systems request!", e);
    }
}
Also used : URIException(org.apache.commons.httpclient.URIException) ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder) EnphaseenergyException(org.openhab.binding.enphaseenergy.internal.EnphaseenergyException)

Aggregations

URIException (org.apache.commons.httpclient.URIException)1 ToStringBuilder (org.apache.commons.lang.builder.ToStringBuilder)1 EnphaseenergyException (org.openhab.binding.enphaseenergy.internal.EnphaseenergyException)1