mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-17 01:46:20 +08:00
feat(work): 新增文档表格相关接口
This commit is contained in:
parent
2bfb386cf6
commit
1b8734fc5e
@ -189,6 +189,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinWedocModifyDocumentSafeSettingResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/wedoc/document/batch_update 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97626 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinWedocDocumentBatchUpdateResponse> ExecuteCgibinWedocDocumentBatchUpdateAsync(this WechatWorkClient client, Models.CgibinWedocDocumentBatchUpdateRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "wedoc", "document", "batch_update")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinWedocDocumentBatchUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Form
|
||||
@ -292,5 +312,67 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinWedocGetFormAnswerResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SpreadSheet
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/wedoc/spreadsheet/batch_update 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97628 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinWedocSpreadSheetBatchUpdateResponse> ExecuteCgibinWedocSpreadSheetBatchUpdateAsync(this WechatWorkClient client, Models.CgibinWedocSpreadSheetBatchUpdateRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "wedoc", "spreadsheet", "batch_update")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinWedocSpreadSheetBatchUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/wedoc/spreadsheet/get_sheet_properties 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97711 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinWedocSpreadSheetGetSheetPropertiesResponse> ExecuteCgibinWedocSpreadSheetGetSheetPropertiesAsync(this WechatWorkClient client, Models.CgibinWedocSpreadSheetGetSheetPropertiesRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "wedoc", "spreadsheet", "get_sheet_properties")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinWedocSpreadSheetGetSheetPropertiesResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/wedoc/spreadsheet/get_sheet_range_data 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97661 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinWedocSpreadSheetGetSheetRangeDataResponse> ExecuteCgibinWedocSpreadSheetGetSheetRangeDataAsync(this WechatWorkClient client, Models.CgibinWedocSpreadSheetGetSheetRangeDataRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "wedoc", "spreadsheet", "get_sheet_range_data")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinWedocSpreadSheetGetSheetRangeDataResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,266 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/document/batch_update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocDocumentBatchUpdateRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UpdateRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Range
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_index")]
|
||||
public int StartIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置长度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("length")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("length")]
|
||||
public int Length { get; set; }
|
||||
}
|
||||
|
||||
public class Location
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("index")]
|
||||
public int Index { get; set; }
|
||||
}
|
||||
|
||||
public class ReplaceTextRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置要替换的文本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string Text { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置要替换的文档范围列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ranges")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ranges")]
|
||||
public IList<Range> RangeList { get; set; } = new List<Range>();
|
||||
}
|
||||
|
||||
public class InsertTextRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置要插入的文本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string Text { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置插入的位置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location")]
|
||||
public Location Location { get; set; } = new Location();
|
||||
}
|
||||
|
||||
public class DeleteContentRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置要删除的范围信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public Range Range { get; set; } = new Range();
|
||||
}
|
||||
|
||||
public class InsertImageRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置要插入的图片 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image_id")]
|
||||
public string ImageId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片宽度(单位:像素)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("width")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("width")]
|
||||
public int? Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片高度(单位:像素)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("height")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("height")]
|
||||
public int? Height { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置插入的位置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location")]
|
||||
public Location Location { get; set; } = new Location();
|
||||
}
|
||||
|
||||
public class InsertPageBreakRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置插入的位置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location")]
|
||||
public Location Location { get; set; } = new Location();
|
||||
}
|
||||
|
||||
public class InsertTableRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置表格行数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rows")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rows")]
|
||||
public int RowCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置表格列数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cols")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cols")]
|
||||
public int ColumnCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置插入的位置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location")]
|
||||
public Location Location { get; set; } = new Location();
|
||||
}
|
||||
|
||||
public class InsertParagraphRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置插入的位置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("location")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("location")]
|
||||
public Location Location { get; set; } = new Location();
|
||||
}
|
||||
|
||||
public class UpdateTextPropertyRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否加粗。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bold")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bold")]
|
||||
public bool? IsBold { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文字颜色(格式:RRGGBB)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("color")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("color")]
|
||||
public string? Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置背景颜色(格式:RRGGBB)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("background_color")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("background_color")]
|
||||
public string? BackgroundColor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置替换指定位置文本内容的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("replace_text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("replace_text")]
|
||||
public Types.ReplaceTextRequest? ReplaceTextRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置在指定位置插入文本内容的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_text")]
|
||||
public Types.InsertTextRequest? InsertTextRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除指定位置内容的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delete_content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delete_content")]
|
||||
public Types.DeleteContentRequest? DeleteContentRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置在指定位置插入图片的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_image")]
|
||||
public Types.InsertImageRequest? InsertImageRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置在指定位置插入分页符的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_page_break")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_page_break")]
|
||||
public Types.InsertPageBreakRequest? InsertPageBreakRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置在指定位置插入表格的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_table")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_table")]
|
||||
public Types.InsertTableRequest? InsertTableRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置在指定位置插入段落的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_paragraph")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_paragraph")]
|
||||
public Types.InsertParagraphRequest? InsertParagraphRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新指定位置文本属性的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_text_property")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_text_property")]
|
||||
public Types.UpdateTextPropertyRequest? UpdateTextPropertyRequest { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文档 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("docid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("docid")]
|
||||
public string DocumentId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文档版本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||
public int? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置批量更新请求列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("requests")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("requests")]
|
||||
public IList<Types.UpdateRequest> BatchRequestList { get; set; } = new List<Types.UpdateRequest>();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/document/batch_update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocDocumentBatchUpdateResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,342 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/spreadsheet/batch_update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocSpreadSheetBatchUpdateRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UpdateRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AddSheetRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置工作表名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置初始行数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("row_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("row_count")]
|
||||
public int RowCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置初始列数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("column_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("column_count")]
|
||||
public int ColumnCount { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteSheetRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置工作表 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sheet_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sheet_id")]
|
||||
public string SheetId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class UpdateRangeRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GridData
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Row
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Cell
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CellValue
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Link
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置链接 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置链接标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string Text { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超链接内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link")]
|
||||
public Types.Link? Link { get; set; }
|
||||
}
|
||||
|
||||
public class CellFormat
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class TextFormat
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Color
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置红色值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("red")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("red")]
|
||||
public byte Red { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置绿色值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("green")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("green")]
|
||||
public byte Green { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置蓝色值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("blue")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("blue")]
|
||||
public byte Blue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 Alpha 通道值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("alpha")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("alpha")]
|
||||
public byte? Alpha { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字体。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("font")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("font")]
|
||||
public string FontName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("font_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("font_size")]
|
||||
public int FontSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否加粗。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bold")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bold")]
|
||||
public bool IsBold { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否斜体。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("italic")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("italic")]
|
||||
public bool IsItalic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否删除线。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strikethrough")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strikethrough")]
|
||||
public bool IsStrikeThrough { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否下划线。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("underline")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("underline")]
|
||||
public bool IsUnderline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置颜色。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("color")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("color")]
|
||||
public Types.Color? Color { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文字样式信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text_format")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text_format")]
|
||||
public Types.TextFormat TextFormat { get; set; } = new Types.TextFormat();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单元格的数据内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cell_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cell_value")]
|
||||
public Types.CellValue CellValue { get; set; } = new Types.CellValue();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单元格的样式信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cell_format")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cell_format")]
|
||||
public Types.CellFormat CellFormat { get; set; } = new Types.CellFormat();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单元格数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("values")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("values")]
|
||||
public IList<Types.Cell> Cells { get; set; } = new List<Types.Cell>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置起始行号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_row")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_row")]
|
||||
public int StartRowIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置起始列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_column")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_column")]
|
||||
public int StartColumnIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置行数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rows")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rows")]
|
||||
public IList<Types.Row> Rows { get; set; } = new List<Types.Row>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置工作表 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sheet_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sheet_id")]
|
||||
public string SheetId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置表格数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grid_data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grid_data")]
|
||||
public Types.GridData GridData { get; set; } = new Types.GridData();
|
||||
}
|
||||
|
||||
public class DeleteDimensionRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置工作表 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sheet_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sheet_id")]
|
||||
public string SheetId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除维度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("dimension")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("dimension")]
|
||||
public string Dimension { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_index")]
|
||||
public int StartIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置终止位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_index")]
|
||||
public int EndIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置新增工作表的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("add_sheet_request")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("add_sheet_request")]
|
||||
public Types.AddSheetRequest? AddSheetRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除工作表的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delete_sheet_request")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delete_sheet_request")]
|
||||
public Types.DeleteSheetRequest? DeleteSheetRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新范围内单元格内容的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_range_request")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_range_request")]
|
||||
public Types.UpdateRangeRequest? UpdateRangeRequest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除表格连续的行或列的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delete_dimension_request")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delete_dimension_request")]
|
||||
public Types.DeleteDimensionRequest? DeleteDimensionRequest { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文档 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("docid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("docid")]
|
||||
public string DocumentId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置批量更新请求列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("requests")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("requests")]
|
||||
public IList<Types.UpdateRequest> BatchRequestList { get; set; } = new List<Types.UpdateRequest>();
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/spreadsheet/batch_update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocSpreadSheetBatchUpdateResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UpdateResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AddSheetResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SheetProperty : CgibinWedocSpreadSheetGetSheetPropertiesResponse.Types.SheetProperty
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置工作表属性。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("properties")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("properties")]
|
||||
public Types.SheetProperty SheetProperty { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class DeleteSheetResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置工作表 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sheet_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sheet_id")]
|
||||
public string SheetId { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class UpdateRangeResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置数据更新的成功的单元格数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("updated_cells")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("updated_cells")]
|
||||
public int UpdatedCellCount { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteDimensionResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置删除表格连续的行或列数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deleted")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deleted")]
|
||||
public int DeletedCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置新增工作表的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("add_sheet_response")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("add_sheet_response")]
|
||||
public Types.AddSheetResponse? AddSheetResponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除工作表的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delete_sheet_response")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delete_sheet_response")]
|
||||
public Types.DeleteSheetResponse? DeleteSheetResponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新范围内单元格内容的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_range_response")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_range_response")]
|
||||
public Types.UpdateRangeResponse? UpdateRangeResponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除表格连续的行或列的信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delete_dimension_response")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delete_dimension_response")]
|
||||
public Types.DeleteDimensionResponse? DeleteDimensionResponse { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置批量更新响应列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("responses")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("responses")]
|
||||
public Types.UpdateResponse[] BatchResponseList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/spreadsheet/get_sheet_properties 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocSpreadSheetGetSheetPropertiesRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文档 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("docid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("docid")]
|
||||
public string DocumentId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/spreadsheet/get_sheet_properties 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocSpreadSheetGetSheetPropertiesResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SheetProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置工作表 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sheet_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sheet_id")]
|
||||
public string SheetId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置工作表名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总行数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("row_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("row_count")]
|
||||
public int RowCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总列数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("column_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("column_count")]
|
||||
public int ColumnCount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置工作表属性列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.SheetProperty[] SheetPropertyList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/spreadsheet/get_sheet_range_data 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocSpreadSheetGetSheetRangeDataRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文档 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("docid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("docid")]
|
||||
public string DocumentId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置工作表 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sheet_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sheet_id")]
|
||||
public string SheetId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置查询范围字符串(格式:A1 表示法)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public string RangeString { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,227 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/wedoc/spreadsheet/get_sheet_range_data 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinWedocSpreadSheetGetSheetRangeDataResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GridData
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Row
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Cell
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CellValue
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Link
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置链接 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置链接标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string Text { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超链接内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link")]
|
||||
public Types.Link? Link { get; set; }
|
||||
}
|
||||
|
||||
public class CellFormat
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class TextFormat
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Color
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置红色值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("red")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("red")]
|
||||
public byte Red { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置绿色值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("green")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("green")]
|
||||
public byte Green { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置蓝色值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("blue")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("blue")]
|
||||
public byte Blue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 Alpha 通道值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("alpha")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("alpha")]
|
||||
public byte Alpha { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字体。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("font")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("font")]
|
||||
public string FontName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("font_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("font_size")]
|
||||
public int FontSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否加粗。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bold")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bold")]
|
||||
public bool IsBold { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否斜体。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("italic")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("italic")]
|
||||
public bool IsItalic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否删除线。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strikethrough")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strikethrough")]
|
||||
public bool IsStrikeThrough { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否下划线。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("underline")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("underline")]
|
||||
public bool IsUnderline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置颜色。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("color")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("color")]
|
||||
public Types.Color? Color { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文字样式信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text_format")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text_format")]
|
||||
public Types.TextFormat TextFormat { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单元格的数据内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cell_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cell_value")]
|
||||
public Types.CellValue CellValue { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单元格的样式信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cell_format")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cell_format")]
|
||||
public Types.CellFormat CellFormat { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单元格数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("values")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("values")]
|
||||
public Types.Cell[] Cells { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置起始行号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_row")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_row")]
|
||||
public int StartRowIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置起始列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_column")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_column")]
|
||||
public int StartColumnIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置行数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rows")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rows")]
|
||||
public Types.Row[] Rows { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置表格数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public Types.GridData GridData { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
{
|
||||
"docid": "DOCID",
|
||||
"version": 10,
|
||||
"requests": [
|
||||
{
|
||||
"replace_text": {
|
||||
"text": "hello world",
|
||||
"ranges": [
|
||||
{
|
||||
"start_index": 10,
|
||||
"length": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"insert_text": {
|
||||
"text": "text content",
|
||||
"location": {
|
||||
"index": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"delete_content": {
|
||||
"range": {
|
||||
"start_index": 10,
|
||||
"length": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"insert_image": {
|
||||
"image_id": "https://https://wework.qpic.cn/wwpic/xxxxxx",
|
||||
"width": 10,
|
||||
"height": 10,
|
||||
"location": {
|
||||
"index": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"insert_page_break": {
|
||||
"location": {
|
||||
"index": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"insert_table": {
|
||||
"rows": 2,
|
||||
"cols": 2,
|
||||
"location": {
|
||||
"index": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"insert_paragraph": {
|
||||
"location": {
|
||||
"index": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"update_text_property": {
|
||||
"bold": true,
|
||||
"color": "000000",
|
||||
"background_color": "0000FF"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
{
|
||||
"docid": "DOCID",
|
||||
"requests": [
|
||||
{
|
||||
"add_sheet_request": {
|
||||
"title": "sheet_name",
|
||||
"row_count": 10,
|
||||
"column_count": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"update_range_request": {
|
||||
"sheet_id": "AAAAA",
|
||||
"grid_data": {
|
||||
"start_row": 1,
|
||||
"start_column": 1,
|
||||
"rows": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"cell_value": {
|
||||
"text": "hello world",
|
||||
"link": {
|
||||
"text": "hello world",
|
||||
"url": "http://xxxx.com"
|
||||
}
|
||||
},
|
||||
"cell_format": {
|
||||
"text_format": {
|
||||
"font": "Courier New",
|
||||
"font_size": 14,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"color": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 255,
|
||||
"alpha": 255
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"delete_dimension_request": {
|
||||
"sheet_id": "AAAAA",
|
||||
"dimension": "ROW"
|
||||
}
|
||||
},
|
||||
{
|
||||
"delete_sheet_request": {
|
||||
"sheet_id": "AAAAA"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"data": {
|
||||
"responses": [
|
||||
{
|
||||
"add_sheet_response": {
|
||||
"properties": {
|
||||
"sheet_id": "ABCDE",
|
||||
"title": "XXXXXX",
|
||||
"row_count": 100,
|
||||
"column_count": 100
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"update_range_response": {
|
||||
"updated_cells": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"delete_dimension_response": {
|
||||
"deleted": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"delete_sheet_response": {
|
||||
"sheet_id": "AABBCC"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"docid": "DOCID"
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"data": [
|
||||
{
|
||||
"sheet_id": "ABCDE",
|
||||
"title": "XXXXXX",
|
||||
"row_count": 100,
|
||||
"column_count": 100
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"docid": "DOCID",
|
||||
"sheet_id": "AABBCC",
|
||||
"range": "A1:B2"
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"data": {
|
||||
"result": {
|
||||
"start_row": 1,
|
||||
"start_column": 1,
|
||||
"rows": [
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"cell_value": {
|
||||
"text": "hello world",
|
||||
"link": {
|
||||
"text": "hello world",
|
||||
"url": "http://xxxx.com"
|
||||
}
|
||||
},
|
||||
"cell_format": {
|
||||
"text_format": {
|
||||
"font": "Courier New",
|
||||
"font_size": 14,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"color": {
|
||||
"red": 0,
|
||||
"green": 0,
|
||||
"blue": 255,
|
||||
"alpha": 255
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user