DNS.OpenSDK 1.0.0-preview

This is a prerelease version of DNS.OpenSDK.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DNS.OpenSDK --version 1.0.0-preview                
NuGet\Install-Package DNS.OpenSDK -Version 1.0.0-preview                
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="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                
#r "nuget: DNS.OpenSDK, 1.0.0-preview"                
#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.
// 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                

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

路径导航

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

示例

  • 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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.

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 1,111 12/12/2017
1.0.0-preview 841 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)