初始提交
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace MAF1.Tools;
|
||||
|
||||
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; } = "";
|
||||
}
|
||||
Reference in New Issue
Block a user