Test Failed
Pull Request — master (#1564)
by milkmeowo
04:45
created

DataCubeClient   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A userBehavior() 0 9 1
1
<?php
2
3
4
namespace EasyWeChat\Work\Crm;
5
6
7
use EasyWeChat\Kernel\BaseClient;
8
9
/**
10
 * Class DataCubeClient.
11
 *
12
 * @author milkmeowo <[email protected]>
13
 */
14
class DataCubeClient extends BaseClient
15
{
16
    /**
17
     * 获取员工行为数据
18
     * @link https://work.weixin.qq.com/api/doc#90000/90135/91580
19
     *
20
     * @param array $userIds
21
     * @param string $from
22
     * @param string $to
23
     * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
24
     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
25
     */
26
    public function userBehavior(array $userIds, string $from, string $to)
27
    {
28
        $params = [
29
            'userid' => $userIds,
30
            'start_time' => $from,
31
            'end_time' => $to,
32
        ];
33
34
        return $this->httpPostJson('cgi-bin/externalcontact/get_user_behavior_data', $params);
35
    }
36
}