- Expanded IMoonrakerClient interface with 6 strongly-typed methods: - GetServerInfoAsync (Moonraker /server/info) - IsReachableAsync (connectivity check) - GetPrinterInfoAsync (Moonraker /printer/info) - GetPrintHistoryAsync (Moonraker /server/history/items) - GetPrintStatsAsync (Moonraker /printer/objects/query?print_stats) - GetDisplayStatusAsync (Moonraker /printer/objects/query?display_status) - GetFilamentUsageAsync (retained for backward compatibility) - Created Domain/DTOs/Moonraker/ with 7 DTOs: - MoonrakerServerInfo, MoonrakerPrinterInfo, MoonrakerPrintJob - MoonrakerHistoryResponse, MoonrakerPrintStats - MoonrakerDisplayStatus, MoonrakerRequest - Updated MoonrakerClient implementation to support all new methods with proper JSON parsing and mapping helpers - Full XML doc comments on all public members
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
namespace Extrudex.Domain.DTOs.Moonraker;
|
|
|
|
/// <summary>
|
|
/// Response DTO for the Moonraker /server/info endpoint.
|
|
/// Contains server identification and operational state.
|
|
/// Used to verify connectivity and determine Moonraker version.
|
|
/// </summary>
|
|
public class MoonrakerServerInfo
|
|
{
|
|
/// <summary>
|
|
/// The hostname of the Moonraker server (e.g., "mainsail").
|
|
/// </summary>
|
|
public string Hostname { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Moonraker software version string (e.g., "0.8.0-89ee464").
|
|
/// </summary>
|
|
public string SoftwareVersion { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// CPU model string reported by the host system.
|
|
/// </summary>
|
|
public string CpuInfo { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Whether Klipper is currently connected to the MCU.
|
|
/// </summary>
|
|
public bool KlippyConnected { get; set; }
|
|
|
|
/// <summary>
|
|
/// The current Klipper state (e.g., "ready", "startup", "error").
|
|
/// </summary>
|
|
public string KlippyState { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Whether the Moonraker API requires an authentication token.
|
|
/// </summary>
|
|
public bool ApiKeyRequired { get; set; }
|
|
|
|
/// <summary>
|
|
/// List of registered Moonraker plugin names.
|
|
/// </summary>
|
|
public List<string> Plugins { get; set; } = [];
|
|
} |