namespace TownOfUsStatsExporter.Config; /// /// Configuration model for API settings. /// public class ApiConfig { /// /// Gets or sets a value indicating whether API export is enabled. /// public bool EnableApiExport { get; set; } = false; /// /// Gets or sets the API authentication token. /// public string? ApiToken { get; set; } = null; /// /// Gets or sets the API endpoint URL. /// public string? ApiEndpoint { get; set; } = null; /// /// Gets or sets a value indicating whether local backups should be saved. /// public bool SaveLocalBackup { get; set; } = false; /// /// Gets or sets the optional secret for additional authentication. /// public string? Secret { get; set; } = null; /// /// Checks if the configuration is valid for API export. /// /// True if configuration is valid. public bool IsValid() { return EnableApiExport && !string.IsNullOrWhiteSpace(ApiToken) && !string.IsNullOrWhiteSpace(ApiEndpoint); } }