using System; using System.Collections.Generic; using Top.Api.Util; using Top.Api; using Top.Api.DingTalk; namespace DingTalk.Api.Request { /// /// TOP API: dingtalk.oapi.wiki.group.list /// public class OapiWikiGroupListRequest : BaseDingTalkRequest { /// /// 个人授权信息 /// public string AuthCode { get; set; } /// /// 分页游标(默认0) /// public Nullable Cursor { get; set; } /// /// 1:组织内公开可见 2:非组织内公开可见 /// public Nullable GroupType { get; set; } /// /// 1:管理员 2:编辑权限 3:只读权限 /// public Nullable RoleType { get; set; } /// /// 分页大小(默认20) /// public Nullable Size { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.oapi.wiki.group.list"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_OAPI; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("auth_code", this.AuthCode); parameters.Add("cursor", this.Cursor); parameters.Add("group_type", this.GroupType); parameters.Add("role_type", this.RoleType); parameters.Add("size", this.Size); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateRequired("auth_code", this.AuthCode); RequestValidator.ValidateRequired("group_type", this.GroupType); RequestValidator.ValidateRequired("role_type", this.RoleType); } #endregion } }