2 * Copyright (c) 2010-2023 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.sleepiq.internal.api.impl;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link Endpoints} class contains all endpoints for the sleepiq API.
20 * @author Gregory Moyer - Initial contribution
23 public class Endpoints {
24 private static final String LOGIN = "/rest/login";
25 private static final String BED = "/rest/bed";
26 private static final String SLEEPER = "/rest/sleeper";
27 private static final String FAMILY_STATUS = "/rest/bed/familyStatus";
28 private static final String PAUSE_MODE = "/rest/bed/%s/pauseMode";
29 private static final String SLEEP_DATA = "/rest/sleepData";
30 private static final String SET_SLEEP_NUMBER = "/rest/bed/%s/sleepNumber";
31 private static final String SET_PAUSE_MODE = "/rest/bed/%s/pauseMode";
33 public static String login() {
37 public static String bed() {
41 public static String sleeper() {
45 public static String familyStatus() {
49 public static String pauseMode(String bedId) {
50 return String.format(PAUSE_MODE, bedId);
53 public static String sleepData() {
57 public static String setSleepNumber(String bedId) {
58 return String.format(SET_SLEEP_NUMBER, bedId);
61 public static String setPauseMode(String bedId) {
62 return String.format(SET_PAUSE_MODE, bedId);