OapiGettokenRequest.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.gettoken request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.08.28
  7. */
  8. class OapiGettokenRequest
  9. {
  10. /**
  11. * 应用的唯一标识key
  12. **/
  13. private $appkey;
  14. /**
  15. * 应用的密钥
  16. **/
  17. private $appsecret;
  18. /**
  19. * 企业的corpid
  20. **/
  21. private $corpid;
  22. /**
  23. * 企业的密钥
  24. **/
  25. private $corpsecret;
  26. private $apiParas = array();
  27. public function setAppkey($appkey)
  28. {
  29. $this->appkey = $appkey;
  30. $this->apiParas["appkey"] = $appkey;
  31. }
  32. public function getAppkey()
  33. {
  34. return $this->appkey;
  35. }
  36. public function setAppsecret($appsecret)
  37. {
  38. $this->appsecret = $appsecret;
  39. $this->apiParas["appsecret"] = $appsecret;
  40. }
  41. public function getAppsecret()
  42. {
  43. return $this->appsecret;
  44. }
  45. public function setCorpid($corpid)
  46. {
  47. $this->corpid = $corpid;
  48. $this->apiParas["corpid"] = $corpid;
  49. }
  50. public function getCorpid()
  51. {
  52. return $this->corpid;
  53. }
  54. public function setCorpsecret($corpsecret)
  55. {
  56. $this->corpsecret = $corpsecret;
  57. $this->apiParas["corpsecret"] = $corpsecret;
  58. }
  59. public function getCorpsecret()
  60. {
  61. return $this->corpsecret;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.gettoken";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. }
  74. public function putOtherTextParam($key, $value) {
  75. $this->apiParas[$key] = $value;
  76. $this->$key = $value;
  77. }
  78. }