mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-14 03:56:22 +08:00
feat(work): 新增微盘文件分块上传相关接口
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedrive/file_upload_finish 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedriveFileUploadFinishRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上传凭证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("upload_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("upload_key")]
|
||||
public string UploadKey { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedrive/file_upload_finish 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedriveFileUploadFinishResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fileid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fileid")]
|
||||
public string FileId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedrive/file_upload_init 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedriveFileUploadInitializeRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 JSAPI 返回的 SelectedTicket。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("selected_ticket")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("selected_ticket")]
|
||||
public string? SelectedTicket { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置空间 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("spaceid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("spaceid")]
|
||||
public string? SpaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上级文件 ID 或空间 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fatherid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fatherid")]
|
||||
public string? ParentFileOrSpaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("file_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("file_name")]
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件大小(单位:字节)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("size")]
|
||||
public int FileSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件分块 SHA 哈希值列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("block_sha")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("block_sha")]
|
||||
public IList<string> BlockSHAList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否跳过推送。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skip_push_card")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skip_push_card")]
|
||||
public bool? IsSkipPushCard { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedrive/file_upload_init 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedriveFileUploadInitializeResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否命中秒传。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("hit_exist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("hit_exist")]
|
||||
public bool IsHitExist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上传凭证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("upload_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("upload_key")]
|
||||
public string? UploadKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fileid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fileid")]
|
||||
public string? FileId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedrive/file_upload_part 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedriveFileUploadPartRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上传凭证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("upload_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("upload_key")]
|
||||
public string UploadKey { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件分块号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("index")]
|
||||
public int Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经过 Base64 编码的文件分块内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("file_base64_content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("file_base64_content")]
|
||||
public string EncodingBlockContent { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedrive/file_upload_part 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedriveFileUploadPartResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user