hongmao.Amap.Core
1.0.0
dotnet add package hongmao.Amap.Core --version 1.0.0
NuGet\Install-Package hongmao.Amap.Core -Version 1.0.0
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.Core" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="hongmao.Amap.Core" Version="1.0.0" />
<PackageReference Include="hongmao.Amap.Core" />
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.Core --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: hongmao.Amap.Core, 1.0.0"
#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.Core&version=1.0.0
#tool nuget:?package=hongmao.Amap.Core&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AMAP API Core 模块
目录
概述
AMAP API Core 模块是高德地图API的C#核心库,为上层应用提供访问高德地图API的基础设施和核心功能。本模块主要提供:
- 统一的API请求管理
- 基础配置管理
- 通用的响应处理
- 可扩展的API上下文支持
核心功能
- 🔐 统一的API请求管理
- ⚙️ 灵活的配置管理
- 🛡️ 通用的错误处理
- 📦 基础响应模型
- 🔗 可扩展的API上下文支持
- 🕒 请求调试支持
快速开始
安装
# 使用 NuGet 安装
Install-Package AMAP.Core
使用示例
using amap_api_core;
// 初始化配置
var config = new AmapConfig {
Key = "your-amap-key",
BaseUrl = "https://restapi.amap.com/v3"
};
// 创建API上下文
var api = AmapBuilder.Create<AmapApi<ApiOptions>, ApiOptions>(config);
// 发送请求
var options = new ApiOptions { /* 设置具体参数 */ };
var response = await api.Request(HttpMethod.Get, options);
主要类说明
AmapApi<TO>
- 核心API上下文类
- 提供统一的请求管理
- 支持泛型选项类型
AmapConfig
- 配置管理类
- 管理API Key和基础URL
- 提供配置验证
AmapBuilder
- 上下文构建器
- 简化API上下文创建
- 支持类型安全的构建
AmapResponse
- 基础响应类
- 包含通用响应字段
- 支持JSON反序列化
版本信息
当前版本:v1.0.0
依赖
- .NET Core 3.1+
- Newtonsoft.Json 13.0+
- System.Net.Http 4.3.4+
贡献指南
我们欢迎任何形式的贡献!请遵循以下步骤:
- 阅读 贡献指南
- 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
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on hongmao.Amap.Core:
Package | Downloads |
---|---|
hongmao.Amap.Weather
AMAP Weather API 模块是基于 AMAP API Core 的高德地图天气服务封装库,提供简单易用的接口来获取实时天气和天气预报信息。本模块主要功能包括: - 实时天气信息查询 - 天气预报信息查询 - 灵活的查询参数配置 - 标准化的数据模型 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 144 | 2/26/2025 |