DNS.OpenSDK 1.0.0-preview

.NET Standard 2.0
This is a prerelease version of DNS.OpenSDK.
There is a newer version of this package available.
See the version list below for details.
Install-Package DNS.OpenSDK -Version 1.0.0-preview
dotnet add package DNS.OpenSDK --version 1.0.0-preview
<PackageReference Include="DNS.OpenSDK" Version="1.0.0-preview" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DNS.OpenSDK --version 1.0.0-preview
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DNS.OpenSDK, 1.0.0-preview"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DNS.OpenSDK as a Cake Addin
#addin nuget:?package=DNS.OpenSDK&version=1.0.0-preview&prerelease

// Install DNS.OpenSDK as a Cake Tool
#tool nuget:?package=DNS.OpenSDK&version=1.0.0-preview&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DotNetStar.OpenSDK

集成各大开放平台 SDK 。独创路径导航法,让上手成本几乎为零,同时具备简易的扩展性,只需要2步即可增加相关的 api 开发自己的 sdk。

特点

  • 完全即可使用,无须任何配置;
  • 独创路径导航法,无须查阅文档就可以知道在哪使用;
  • 采用强类型参数和返回值,无须思考就可以知道有哪些内容;
  • 扩展自己的 SDK 只需要2步,上手难度几乎为零;
  • 支持异步,提升性能,支持并发;
  • 支持 .NET Framework 4.6.1+/.NET Core 2.0+/.NET Standard 2.0+

在线安装(v1.0-preview 预览版)

Install-Package DNS.OpenSDK -version 1.0-preview

路径导航

示例

  • QQ 互联

      OAuthConfig config = new OAuthConfig("appId", "appKey", "回调地址 url");
    
      //生成 qq 登录的链接
      var link = SDK.Use.QQConnect().GenerateAuthorizeCodeUrl(new QQAuthorizeCodeApiRequest(config));
    
      var code = "获得的 code";
      var response = await SDK.Use.QQConnect().GetAccessTokenAsync(config, code);
      //直接使用属性即可获得 access_token
      // response.Access_Token 
      // response.Expires_In
      // response.Refresh_Token
    
  • 微信登录

      OAuthConfig config = new OAuthConfig("appId", "appKey", "授权回调地址");
      //生成微信登录的二维码 url
      SDK.Use.WeChat().GenerateWeChatQrCodeAuthorizeLink(new WeChatQrCodeAuthorizeCodeApiRequest(config));
    
      //生成在微信客户端进行登录的链接 url
      SDK.Use.WeChat().GenerateWeChatAuthorizeLink(new WeChatAuthorizeCodeApiRequest(config))
    
  • 微信公众号

      //获取微信公众号的用户信息
      SDK.Use.WeChat().MP().GetUserInfoAsync(new UserInfoApiRequest(accessToken, openId))
    
  • 微信支付

      PaymentConfig config = new PaymentConfig("appId", "商户号", "密钥");
      SDK.Use.WeChat().Pay().UnifiedOrderAsync(new UnifiedOrderApiRequest(config)
    {
        Out_Trade_No = orderNo,
        Spbill_Create_Ip = "1.2.3.4",
        Body = "test",
        Total_Fee = 15000,
        Notify_Url = "http://abc",
        Trade_Type = TradeTypes.NATIVE
    })
    

SDK 已集成的开放平台和 api 列表(v1.0-preview)

  • QQ互联(QQConnect)官网
    • 生成 QQ 登录的 url(GenerateAuthorizeCodeUrl)
    • 获取 access_token (GetAccessTokenAsync)
    • 获取 OpenId (GetOpenIdAsync)
    • 获取用户在QQ空间的个人信息(GetUserInfoAsync)
    • 获取QQ会员的基本信息(GetVipInfoAsync)
    • 获取QQ会员的高级信息(GetVipRichInfoAsync)
    • 获取QQ空间的相册列表(GetAlbumListAsync)
    • 获取QQ空间指定的相册照片列表(GetAlbumPhotoListAsync)
  • 微信(WeChat)
    • 开放平台(Open)官网
      • 生成可以再网页端进行微信登录的二维码链接(GenerateWeChatQrCodeAuthorizeLink)
      • 生成可在微信客户端进行登录授权的 url 链接(GenerateWeChatAuthorizeLink)
      • 获取微信应用的 access_token(GetAppAccessTokenAsync)
      • 获取微信的 access_token (GetAccessTokenAsync)
      • 刷新 access token 令牌(RefreshAccessTokenAsync)
    • 公众号(MP)官网
      • 获取微信服务器的 Ip 列表(GetIpListAsync)
      • 获取指定用户的信息(GetUserInfoAsync)
      • 获取关注公众号的用户列表(GetUserListAsync)
    • 支付(Pay)官网
      • 统一下单(UnifiedOrderAsync)
      • 订单查询(OrderQueryAsync)
      • 关闭订单(CloseOrderAsync)
      • 申请退款(RefundAsync)
      • 退款查询(RefundQueryAsync)
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 762 12/12/2017
1.0.0-preview 642 12/8/2017

* QQ互联(QQConnect)[官网](http://connect.qq.com/)
* 生成 QQ 登录的 url(GenerateAuthorizeCodeUrl)
* 获取 access_token (GetAccessTokenAsync)
* 获取 OpenId (GetOpenIdAsync)
* 获取用户在QQ空间的个人信息(GetUserInfoAsync)
* 获取QQ会员的基本信息(GetVipInfoAsync)
* 获取QQ会员的高级信息(GetVipRichInfoAsync)
* 获取QQ空间的相册列表(GetAlbumListAsync)
* 获取QQ空间指定的相册照片列表(GetAlbumPhotoListAsync)
* 微信(WeChat)
* 开放平台(Open)[官网](http://open.weixin.qq.com/)
* 生成可以再网页端进行微信登录的二维码链接(GenerateWeChatQrCodeAuthorizeLink)
* 生成可在微信客户端进行登录授权的 url 链接(GenerateWeChatAuthorizeLink)
* 获取微信应用的 access_token(GetAppAccessTokenAsync)
* 获取微信的 access_token (GetAccessTokenAsync)
* 刷新 access token 令牌(RefreshAccessTokenAsync)
* 公众号(MP)[官网](http://mp.weixin.qq.com/)
* 获取微信服务器的 Ip 列表(GetIpListAsync)
* 获取指定用户的信息(GetUserInfoAsync)
* 获取关注公众号的用户列表(GetUserListAsync)
* 支付(Pay)[官网](http://pay.weixin.qq.com/)
* 统一下单(UnifiedOrderAsync)
* 订单查询(OrderQueryAsync)
* 关闭订单(CloseOrderAsync)
* 申请退款(RefundAsync)
* 退款查询(RefundQueryAsync)