Completed
Push — master ( 2dd47c...3d7f26 )
by do
02:42
created

Client::list()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 11
nc 1
nop 2
dl 0
loc 14
ccs 0
cts 14
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the docodeit/wechat.
5
 *
6
 * (c) docodeit <[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 JinWeChat\OfficialAccount\Users;
13
14
use JinWeChat\Kernel\BaseClient;
15
16
class Client extends BaseClient
17
{
18
    /**
19
     * 用户管理列表.
20
     * @param int $offset
21
     * @param int $limit
22
     * @return \Psr\Http\Message\ResponseInterface
23
     * @throws \JinWeChat\Kernel\Exceptions\InvalidConfigException
24
     */
25
    public function list($offset = 0, $limit = 10)
26
    {
27
        $query = [
28
            'query' => [
29
                'action' => 'get_user_list',
30
                'limit' => $limit,
31
                'offset' => $offset,
32
                'f' => 'json',
33
                'lang' => 'zh_CN',
34
                'ajax' => '1',
35
                'random' => $this->getMillisecond(),
36
            ]
37
        ];
38
        return $this->httpGet('cgi-bin/user_tag', $query);
39
    }
40
}
41