Files
MAF1/MAF1.Core/Tools/WeatherOptions.cs
T
admin777 950d09ddb0 docs: 为 CLI、网页编排器和插件协议补充学习向注释
在核心类型、图执行器、stdio 插件和前端入口写清职责与对照路径,不改运行行为。
2026-08-28 11:51:48 +08:00

24 lines
768 B
C#

namespace MAF1.Tools;
/// <summary>对应 appsettings.json 的 Weather 段。CLI 和 Web 各自有一份配置文件。</summary>
public sealed class WeatherOptions
{
public string Provider { get; set; } = "Wttr";
public string Language { get; set; } = "zh";
public WttrOptions Wttr { get; set; } = new();
public OpenWeatherOptions OpenWeather { get; set; } = new();
}
public sealed class WttrOptions
{
public string UrlTemplate { get; set; } = "https://wttr.in/{location}?lang={lang}&format=3";
}
public sealed class OpenWeatherOptions
{
public string UrlTemplate { get; set; } =
"https://api.openweathermap.org/data/2.5/weather?q={location}&appid={apiKey}&units=metric&lang={lang}";
public string ApiKey { get; set; } = "";
}