TmcGroupsGetRequest.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Collections.Generic;
  3. using Top.Api.Util;
  4. namespace Top.Api.Request
  5. {
  6. /// <summary>
  7. /// TOP API: taobao.tmc.groups.get
  8. /// </summary>
  9. public class TmcGroupsGetRequest : BaseTopRequest<Top.Api.Response.TmcGroupsGetResponse>
  10. {
  11. /// <summary>
  12. /// 要查询分组的名称,多个分组用半角逗号分隔,不传代表查询所有分组信息,但不会返回组下面的用户信息。如果应用没有设置分组则返回空。组名不能以default开头,default开头是系统默认的组。
  13. /// </summary>
  14. public string GroupNames { get; set; }
  15. /// <summary>
  16. /// 页码
  17. /// </summary>
  18. public Nullable<long> PageNo { get; set; }
  19. /// <summary>
  20. /// 每页返回多少个分组
  21. /// </summary>
  22. public Nullable<long> PageSize { get; set; }
  23. #region ITopRequest Members
  24. public override string GetApiName()
  25. {
  26. return "taobao.tmc.groups.get";
  27. }
  28. public override IDictionary<string, string> GetParameters()
  29. {
  30. TopDictionary parameters = new TopDictionary();
  31. parameters.Add("group_names", this.GroupNames);
  32. parameters.Add("page_no", this.PageNo);
  33. parameters.Add("page_size", this.PageSize);
  34. if (this.otherParams != null)
  35. {
  36. parameters.AddAll(this.otherParams);
  37. }
  38. return parameters;
  39. }
  40. public override void Validate()
  41. {
  42. RequestValidator.ValidateMaxListSize("group_names", this.GroupNames, 20);
  43. }
  44. #endregion
  45. }
  46. }