class ShellyplugExporter::PlugClient

Overview

Handles HTTP communication with a single Shelly plug device.

Defined in:

shellyplug_exporter/plug_client.cr

Constant Summary

SETTINGS_ENDPOINT = "/settings"
STATUS_ENDPOINT = "/status"

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : PlugConfig) #

Instance Method Detail

def fetch_settings : HTTP::Client::Response #

Fetches the settings from the plug.


def fetch_status : HTTP::Client::Response #

Fetches the status from the plug.