2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.automower.internal.rest.api;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jetty.client.HttpClient;
18 import com.google.gson.Gson;
19 import com.google.gson.GsonBuilder;
22 * Base class for the Husqvarna apis
24 * @author Markus Pfleger - Initial contribution
27 public abstract class HusqvarnaApi {
28 private final HttpClient httpClient;
29 protected final Gson gson;
31 protected HusqvarnaApi(HttpClient httpClient) {
32 this.httpClient = httpClient;
34 GsonBuilder gsonBuilder = new GsonBuilder();
35 gson = gsonBuilder.create();
38 protected abstract String getBaseUrl();
40 protected HttpClient getHttpClient() {