hongmao.Amap.Weather
1.0.1
dotnet add package hongmao.Amap.Weather --version 1.0.1
NuGet\Install-Package hongmao.Amap.Weather -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="hongmao.Amap.Weather" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="hongmao.Amap.Weather" Version="1.0.1" />
<PackageReference Include="hongmao.Amap.Weather" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add hongmao.Amap.Weather --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: hongmao.Amap.Weather, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=hongmao.Amap.Weather&version=1.0.1
#tool nuget:?package=hongmao.Amap.Weather&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AMAP Weather API 模块
目录
概述
AMAP Weather API 模块是基于 AMAP API Core 的高德地图天气服务封装库,提供简单易用的接口来获取实时天气和天气预报信息。本模块主要功能包括:
- 实时天气信息查询
- 天气预报信息查询
- 灵活的查询参数配置
- 标准化的数据模型
主要功能
- 🌦️ 实时天气查询
- 📅 天气预报查询
- 🏙️ 基于adcode的城市天气查询
- 🔍 扩展信息支持(基础/详细)
- 📊 标准化的天气数据模型
快速开始
安装
# 使用 NuGet 安装
Install-Package AMAP.Weather
使用示例
using amap_api_weather;
// 初始化天气API
var weatherApi = new AmapApiWeather
{
Config = new AmapConfig
{
Key = "your-amap-key",
BaseUrl = "https://restapi.amap.com/v3"
}
};
// 查询实时天气
var options = new WeatherOptions
{
City = "110105", // 使用adcode查询,例如:110105(北京市朝阳区)
Extensions = "base" // 或 "all" 获取详细信息
};
var weatherInfo = await weatherApi.GetWeatherInfo(options);
数据模型
WeatherResponse
- 基础响应类,继承自
AmapResponse
- 包含实时天气和预报信息
WeatherLive
- 实时天气信息
- 包含温度、湿度、风向等数据
WeatherForecast
- 天气预报信息
- 包含未来几天的天气预测
WeatherCast
- 每日天气预报详情
- 包含白天和夜间的天气情况
版本信息
当前版本:v1.0.0
依赖
- .NET Standard 2.1
- AMAP API Core
- Newtonsoft.Json 13.0+
贡献指南
我们欢迎任何形式的贡献!请遵循以下步骤:
- 阅读 贡献指南
- Fork 本项目
- 创建特性分支 (
git checkout -b feature/YourFeatureName
) - 提交更改 (
git commit -m 'Add some feature'
) - 推送到分支 (
git push origin feature/YourFeatureName
) - 打开 Pull Request
在提交PR之前,请确保:
- 代码通过所有单元测试
- 添加了必要的XML文档注释
- 遵循C#代码风格指南
许可证
本项目采用 MIT 许可证 - 详情请见 LICENSE 文件
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- hongmao.Amap.Core (>= 1.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
修复依赖关系