Passed
Push — master ( f7e515...09c178 )
by mingyoung
01:34
created

Client   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 7
dl 0
loc 52
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A update() 0 3 1
A failedResult() 0 3 1
A delete() 0 3 1
A list() 0 3 1
A register() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the mingyoung/dingtalk.
5
 *
6
 * (c) 张铭阳 <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EasyDingTalk\Callback;
13
14
use EasyDingTalk\Kernel\BaseClient;
15
16
class Client extends BaseClient
17
{
18
    /**
19
     * 注册业务事件回调接口
20
     *
21
     * @param array $params
22
     *
23
     * @return mixed
24
     */
25
    public function register($params)
26
    {
27
        return $this->client->postJson('call_back/register_call_back', $params);
28
    }
29
30
    /**
31
     * 查询事件回调接口
32
     *
33
     * @return mixed
34
     */
35
    public function list()
36
    {
37
        return $this->client->get('call_back/get_call_back');
38
    }
39
40
    /**
41
     * 更新事件回调接口
42
     *
43
     * @return mixed
44
     */
45
    public function update($params)
46
    {
47
        return $this->client->postJson('call_back/update_call_back', $params);
48
    }
49
50
    /**
51
     * 删除事件回调接口
52
     *
53
     * @return mixed
54
     */
55
    public function delete()
56
    {
57
        return $this->client->get('call_back/delete_call_back');
58
    }
59
60
    /**
61
     * 获取回调失败的结果
62
     *
63
     * @return mixed
64
     */
65
    public function failedResult()
66
    {
67
        return $this->client->get('call_back/get_call_back_failed_result');
68
    }
69
}
70