Blame view

addons/antis/library/dingding/dingtalk/request/OapiGettokenRequest.php 1.44 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  <?php
  /**
   * dingtalk API: dingtalk.oapi.gettoken request
   * 
   * @author auto create
   * @since 1.0, 2018.08.28
   */
  class OapiGettokenRequest
  {

  	/** 

  	 * 应用的唯一标识key

  	 **/

  	private $appkey;

  	

  	/** 

  	 * 应用的密钥

  	 **/

  	private $appsecret;

  	

  	/** 

  	 * 企业的corpid

  	 **/

  	private $corpid;

  	

  	/** 

  	 * 企业的密钥

  	 **/

  	private $corpsecret;
  	
  	private $apiParas = array();
  	

  	public function setAppkey($appkey)
  	{

  		$this->appkey = $appkey;

  		$this->apiParas["appkey"] = $appkey;

  	}
  

  	public function getAppkey()
  	{

  		return $this->appkey;

  	}
  

  	public function setAppsecret($appsecret)
  	{

  		$this->appsecret = $appsecret;

  		$this->apiParas["appsecret"] = $appsecret;

  	}
  

  	public function getAppsecret()
  	{

  		return $this->appsecret;

  	}
  

  	public function setCorpid($corpid)
  	{

  		$this->corpid = $corpid;

  		$this->apiParas["corpid"] = $corpid;

  	}
  

  	public function getCorpid()
  	{

  		return $this->corpid;

  	}
  

  	public function setCorpsecret($corpsecret)
  	{

  		$this->corpsecret = $corpsecret;

  		$this->apiParas["corpsecret"] = $corpsecret;

  	}
  

  	public function getCorpsecret()
  	{

  		return $this->corpsecret;

  	}
  
  	public function getApiMethodName()
  	{
  		return "dingtalk.oapi.gettoken";
  	}
  	
  	public function getApiParas()
  	{
  		return $this->apiParas;
  	}
  	
  	public function check()
  	{
  		
  	}
  	
  	public function putOtherTextParam($key, $value) {
  		$this->apiParas[$key] = $value;
  		$this->$key = $value;
  	}
  }