mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-30 02:14:44 +08:00
feat(work): 新增小程序相关 API 封装
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/miniprogram/jscode2session 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniProgramJsCode2SessionRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// <i>(使用默认值即可,无需修改)</i>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string GrantType { get; set; } = "authorization_code";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置登录时获取的 Code。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string JsCode { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/miniprogram/jscode2session 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniProgramJsCode2SessionResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户所属企业 Corpid。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("corpid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("corpid")]
|
||||
public string CorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户所在企业内的成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户所在企业内的会话密钥。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("session_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("session_key")]
|
||||
public string SessionKey { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/service/miniprogram/jscode2session 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceMiniProgramJsCode2SessionRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// <i>(使用默认值即可,无需修改)</i>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string GrantType { get; set; } = "authorization_code";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置登录时获取的 Code。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string JsCode { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/service/miniprogram/jscode2session 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceMiniProgramJsCode2SessionResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户所属企业 Corpid。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("corpid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("corpid")]
|
||||
public string CorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户所在企业内的成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户所在企业内的会话密钥。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("session_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("session_key")]
|
||||
public string SessionKey { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置第三方成员唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_userid")]
|
||||
public string OpenUserId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user