OapiDingmiRobotPushRequest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.dingmi.robot.push request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.01.18
  7. */
  8. class OapiDingmiRobotPushRequest
  9. {
  10. /**
  11. * 会话ID
  12. **/
  13. private $conversationId;
  14. /**
  15. * 消息类型
  16. **/
  17. private $msgKey;
  18. /**
  19. * 参考文档
  20. **/
  21. private $msgParam;
  22. private $apiParas = array();
  23. public function setConversationId($conversationId)
  24. {
  25. $this->conversationId = $conversationId;
  26. $this->apiParas["conversation_id"] = $conversationId;
  27. }
  28. public function getConversationId()
  29. {
  30. return $this->conversationId;
  31. }
  32. public function setMsgKey($msgKey)
  33. {
  34. $this->msgKey = $msgKey;
  35. $this->apiParas["msg_key"] = $msgKey;
  36. }
  37. public function getMsgKey()
  38. {
  39. return $this->msgKey;
  40. }
  41. public function setMsgParam($msgParam)
  42. {
  43. $this->msgParam = $msgParam;
  44. $this->apiParas["msg_param"] = $msgParam;
  45. }
  46. public function getMsgParam()
  47. {
  48. return $this->msgParam;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.dingmi.robot.push";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. }
  61. public function putOtherTextParam($key, $value) {
  62. $this->apiParas[$key] = $value;
  63. $this->$key = $value;
  64. }
  65. }