OapiPlanetomFeedsCreateRequest.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.planetom.feeds.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.03.26
  7. */
  8. class OapiPlanetomFeedsCreateRequest
  9. {
  10. /**
  11. * 主播在组织内的id(staffId)
  12. **/
  13. private $anchorId;
  14. /**
  15. * 约定开播时间戳(未来时间)
  16. **/
  17. private $appointBeginTime;
  18. /**
  19. * 封面url
  20. **/
  21. private $coverUrl;
  22. /**
  23. * 课程类型
  24. **/
  25. private $feedType;
  26. /**
  27. * 1 chatId / 2 openConversationId,不传默认为OpenConversationId
  28. **/
  29. private $groupIdType;
  30. /**
  31. * 绑定群列表,如果不传,默认为公开直播
  32. **/
  33. private $groupIds;
  34. /**
  35. * 简介
  36. **/
  37. private $introduction;
  38. /**
  39. * 开放平台中应用的appId
  40. **/
  41. private $openAppId;
  42. /**
  43. * 图片简介url
  44. **/
  45. private $picIntroductionUrl;
  46. /**
  47. * 预告片视频
  48. **/
  49. private $preVideoUrl;
  50. /**
  51. * 课程标题
  52. **/
  53. private $title;
  54. private $apiParas = array();
  55. public function setAnchorId($anchorId)
  56. {
  57. $this->anchorId = $anchorId;
  58. $this->apiParas["anchor_id"] = $anchorId;
  59. }
  60. public function getAnchorId()
  61. {
  62. return $this->anchorId;
  63. }
  64. public function setAppointBeginTime($appointBeginTime)
  65. {
  66. $this->appointBeginTime = $appointBeginTime;
  67. $this->apiParas["appoint_begin_time"] = $appointBeginTime;
  68. }
  69. public function getAppointBeginTime()
  70. {
  71. return $this->appointBeginTime;
  72. }
  73. public function setCoverUrl($coverUrl)
  74. {
  75. $this->coverUrl = $coverUrl;
  76. $this->apiParas["cover_url"] = $coverUrl;
  77. }
  78. public function getCoverUrl()
  79. {
  80. return $this->coverUrl;
  81. }
  82. public function setFeedType($feedType)
  83. {
  84. $this->feedType = $feedType;
  85. $this->apiParas["feed_type"] = $feedType;
  86. }
  87. public function getFeedType()
  88. {
  89. return $this->feedType;
  90. }
  91. public function setGroupIdType($groupIdType)
  92. {
  93. $this->groupIdType = $groupIdType;
  94. $this->apiParas["group_id_type"] = $groupIdType;
  95. }
  96. public function getGroupIdType()
  97. {
  98. return $this->groupIdType;
  99. }
  100. public function setGroupIds($groupIds)
  101. {
  102. $this->groupIds = $groupIds;
  103. $this->apiParas["group_ids"] = $groupIds;
  104. }
  105. public function getGroupIds()
  106. {
  107. return $this->groupIds;
  108. }
  109. public function setIntroduction($introduction)
  110. {
  111. $this->introduction = $introduction;
  112. $this->apiParas["introduction"] = $introduction;
  113. }
  114. public function getIntroduction()
  115. {
  116. return $this->introduction;
  117. }
  118. public function setOpenAppId($openAppId)
  119. {
  120. $this->openAppId = $openAppId;
  121. $this->apiParas["open_app_id"] = $openAppId;
  122. }
  123. public function getOpenAppId()
  124. {
  125. return $this->openAppId;
  126. }
  127. public function setPicIntroductionUrl($picIntroductionUrl)
  128. {
  129. $this->picIntroductionUrl = $picIntroductionUrl;
  130. $this->apiParas["pic_introduction_url"] = $picIntroductionUrl;
  131. }
  132. public function getPicIntroductionUrl()
  133. {
  134. return $this->picIntroductionUrl;
  135. }
  136. public function setPreVideoUrl($preVideoUrl)
  137. {
  138. $this->preVideoUrl = $preVideoUrl;
  139. $this->apiParas["pre_video_url"] = $preVideoUrl;
  140. }
  141. public function getPreVideoUrl()
  142. {
  143. return $this->preVideoUrl;
  144. }
  145. public function setTitle($title)
  146. {
  147. $this->title = $title;
  148. $this->apiParas["title"] = $title;
  149. }
  150. public function getTitle()
  151. {
  152. return $this->title;
  153. }
  154. public function getApiMethodName()
  155. {
  156. return "dingtalk.oapi.planetom.feeds.create";
  157. }
  158. public function getApiParas()
  159. {
  160. return $this->apiParas;
  161. }
  162. public function check()
  163. {
  164. RequestCheckUtil::checkNotNull($this->anchorId,"anchorId");
  165. RequestCheckUtil::checkNotNull($this->appointBeginTime,"appointBeginTime");
  166. RequestCheckUtil::checkNotNull($this->feedType,"feedType");
  167. RequestCheckUtil::checkMaxListSize($this->groupIds,999,"groupIds");
  168. RequestCheckUtil::checkNotNull($this->openAppId,"openAppId");
  169. RequestCheckUtil::checkNotNull($this->title,"title");
  170. }
  171. public function putOtherTextParam($key, $value) {
  172. $this->apiParas[$key] = $value;
  173. $this->$key = $value;
  174. }
  175. }