import { RelayPostRequest, EvokState } from '../../models/evok';
import routes from '../../utilities/routes';
import axios from '../axios';

export class EvokApi {
  async getState(): Promise<EvokState> {
    const response = await axios.get(routes.evok.getState);
    return response.data;
  }

  async setRelay(data: RelayPostRequest) {
    const response = await axios.post<RelayPostRequest>(routes.evok.setRelay, data);
    return response.data;
  }
}
