- 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
25 lines
774 B
C#
25 lines
774 B
C#
namespace Extrudex.Domain.DTOs.Moonraker;
|
|
|
|
/// <summary>
|
|
/// Request DTO for querying the Moonraker API.
|
|
/// Encapsulates the connection parameters needed to reach a specific
|
|
/// Moonraker instance on a Klipper-based printer.
|
|
/// </summary>
|
|
public class MoonrakerRequest
|
|
{
|
|
/// <summary>
|
|
/// Hostname or IP address of the Moonraker printer.
|
|
/// </summary>
|
|
public string HostnameOrIp { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Port number for the Moonraker API. Default: 7125.
|
|
/// </summary>
|
|
public int Port { get; set; } = 7125;
|
|
|
|
/// <summary>
|
|
/// Optional API key for authenticating with Moonraker.
|
|
/// Required when the server has API key authentication enabled.
|
|
/// </summary>
|
|
public string? ApiKey { get; set; }
|
|
} |