GetMediaListResultJson.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*----------------------------------------------------------------
  2. Copyright (C) 2019 Senparc
  3. 文件名:GetMediaListResultJson.cs
  4. 文件功能描述:获取素材列表返回结果
  5. 创建标识:Senparc - 20150324
  6. ----------------------------------------------------------------*/
  7. using System.Collections.Generic;
  8. using Senparc.Weixin.Entities;
  9. using Senparc.Weixin.MP.AdvancedAPIs.GroupMessage;
  10. namespace Senparc.Weixin.MP.AdvancedAPIs.Media
  11. {
  12. /// <summary>
  13. /// 获取素材总数返回结果
  14. /// </summary>
  15. public class BaseMediaListResultJson : WxJsonResult
  16. {
  17. /// <summary>
  18. /// 该类型的素材的总数
  19. /// </summary>
  20. public int total_count { get; set; }
  21. /// <summary>
  22. /// 本次调用获取的素材的数量
  23. /// </summary>
  24. public int item_count { get; set; }
  25. }
  26. /// <summary>
  27. /// 图文素材的Item
  28. /// </summary>
  29. public class MediaList_NewsResult : BaseMediaListResultJson
  30. {
  31. public List<MediaList_News_Item> item { get; set; }
  32. }
  33. public class MediaList_News_Item
  34. {
  35. public string media_id { get; set; }
  36. public Media_News_Content content { get; set; }
  37. /// <summary>
  38. /// 这个素材的最后更新时间
  39. /// </summary>
  40. public long update_time { get; set; }
  41. }
  42. public class Media_News_Content
  43. {
  44. public List<Media_News_Content_Item> news_item { get; set; }
  45. }
  46. public class Media_News_Content_Item : NewsModel
  47. {
  48. public string url { get; set; }
  49. /// <summary>
  50. /// 封面图片的url
  51. /// </summary>
  52. public string thumb_url { get; set; }
  53. }
  54. /// <summary>
  55. /// 除图文之外的其他素材的Item
  56. /// </summary>
  57. public class MediaList_OthersResult : BaseMediaListResultJson
  58. {
  59. public List<MediaList_Others_Item> item { get; set; }
  60. }
  61. public class MediaList_Others_Item
  62. {
  63. public string media_id { get; set; }
  64. /// <summary>
  65. /// 文件名称
  66. /// </summary>
  67. public string name { get; set; }
  68. /// <summary>
  69. /// 这个素材的最后更新时间
  70. /// </summary>
  71. public long update_time { get; set; }
  72. /// <summary>
  73. /// 图文页的URL,或者,当获取的列表是图片素材列表时,该字段是图片的URL
  74. /// </summary>
  75. public string url { get; set; }
  76. }
  77. }