feat(work): 随官方更新日历相关接口模型

This commit is contained in:
fudiwei
2022-12-03 16:29:47 +08:00
parent 59c299619e
commit c54fa2cb6d
7 changed files with 19 additions and 44 deletions

View File

@@ -470,8 +470,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
/// <summary> /// <summary>
/// <para>异步调用 [POST] /cgi-bin/oa/calendar/update 接口。</para> /// <para>异步调用 [POST] /cgi-bin/oa/calendar/update 接口。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93647 </para> /// <para>REF: https://developer.work.weixin.qq.com/document/path/97716 </para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93702 </para>
/// </summary> /// </summary>
/// <param name="client"></param> /// <param name="client"></param>
/// <param name="request"></param> /// <param name="request"></param>
@@ -491,8 +490,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
/// <summary> /// <summary>
/// <para>异步调用 [POST] /cgi-bin/oa/calendar/get 接口。</para> /// <para>异步调用 [POST] /cgi-bin/oa/calendar/get 接口。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93647 </para> /// <para>REF: https://developer.work.weixin.qq.com/document/path/97717 </para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93702 </para>
/// </summary> /// </summary>
/// <param name="client"></param> /// <param name="client"></param>
/// <param name="request"></param> /// <param name="request"></param>
@@ -512,8 +510,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
/// <summary> /// <summary>
/// <para>异步调用 [POST] /cgi-bin/oa/calendar/del 接口。</para> /// <para>异步调用 [POST] /cgi-bin/oa/calendar/del 接口。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93647 </para> /// <para>REF: https://developer.work.weixin.qq.com/document/path/97718 </para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93702 </para>
/// </summary> /// </summary>
/// <param name="client"></param> /// <param name="client"></param>
/// <param name="request"></param> /// <param name="request"></param>

View File

@@ -51,23 +51,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
} }
/// <summary> /// <summary>
/// 获取或设置组织者成员账号。 /// 获取或设置管理员成员账号。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("organizer")] [Newtonsoft.Json.JsonProperty("admins")]
[System.Text.Json.Serialization.JsonPropertyName("organizer")] [System.Text.Json.Serialization.JsonPropertyName("admins")]
public string OrganizerUserId { get; set; } = string.Empty; public IList<string>? AdminUserIdList { get; set; }
/// <summary> /// <summary>
/// 获取或设置组织者对日历是否只读权限 /// 获取或设置是否将该日历设置为默认日历
/// </summary>
[Newtonsoft.Json.JsonProperty("readonly")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("readonly")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? IsReadonly { get; set; }
/// <summary>
/// 获取或设置是否将该日历设置为组织者的默认日历。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("set_as_default")] [Newtonsoft.Json.JsonProperty("set_as_default")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]

View File

@@ -56,20 +56,11 @@
public string CalendarId { get; set; } = default!; public string CalendarId { get; set; } = default!;
/// <summary> /// <summary>
/// 获取或设置组织者成员账号。 /// 获取或设置管理员成员账号。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("organizer")] [Newtonsoft.Json.JsonProperty("admins")]
[System.Text.Json.Serialization.JsonPropertyName("organizer")] [System.Text.Json.Serialization.JsonPropertyName("admins")]
public string OrganizerUserId { get; set; } = default!; public string[] AdminUserId { get; set; } = default!;
/// <summary>
/// 获取或设置组织者对日历是否只读权限。
/// </summary>
[Newtonsoft.Json.JsonProperty("readonly")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("readonly")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsReadonly { get; set; }
/// <summary> /// <summary>
/// 获取或设置日历标题。 /// 获取或设置日历标题。

View File

@@ -30,13 +30,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string CalendarId { get; set; } = string.Empty; public string CalendarId { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 获取或设置组织者对日历是否只读权限 /// 获取或设置管理员成员账号
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("readonly")] [Newtonsoft.Json.JsonProperty("admins")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("admins")]
[System.Text.Json.Serialization.JsonPropertyName("readonly")] public IList<string>? AdminUserIdList { get; set; }
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? IsReadonly { get; set; }
/// <summary> /// <summary>
/// 获取或设置日历标题。 /// 获取或设置日历标题。

View File

@@ -1,7 +1,6 @@
{ {
"calendar": { "calendar": {
"organizer": "userid1", "admins": ["admin1", "admin2"],
"readonly": 1,
"set_as_default": 1, "set_as_default": 1,
"summary": "test_summary", "summary": "test_summary",
"color": "#FF3030", "color": "#FF3030",

View File

@@ -4,8 +4,7 @@
"calendar_list": [ "calendar_list": [
{ {
"cal_id": "wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA", "cal_id": "wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA",
"organizer": "userid1", "admins": ["admin1", "admin2"],
"readonly": 1,
"summary": "test_summary", "summary": "test_summary",
"color": "#FF3030", "color": "#FF3030",
"description": "test_describe_1", "description": "test_describe_1",

View File

@@ -2,7 +2,7 @@
"skip_public_range": 0, "skip_public_range": 0,
"calendar": { "calendar": {
"cal_id": "wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA", "cal_id": "wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA",
"readonly": 1, "admins": ["admin1", "admin2"],
"summary": "test_summary", "summary": "test_summary",
"color": "#FF3030", "color": "#FF3030",
"description": "test_describe_1", "description": "test_describe_1",