Client::list()   A
last analyzed

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 13
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\Appmsg;
13
14
use JinWeChat\Kernel\BaseClient;
15
16
class Client extends BaseClient
17
{
18
    /**
19
     * 图文素材列表.
20
     *
21
     * @param $begin
22
     * @param $count
23
     *
24
     * @return \Psr\Http\Message\ResponseInterface
25
     *
26
     * @throws \JinWeChat\Kernel\Exceptions\InvalidConfigException
27
     */
28
    public function list($begin = 0, $count = 10)
29
    {
30
        $query = [
31
            'query' => ['type' => '10',
32
                'action' => 'list',
33
                'begin' => $begin,
34
                'count' => $count,
35
                'f' => 'json',
36
                'lang' => 'zh_CN',
37
                'ajax' => '1',
38
                'random' => $this->getMillisecond(),
39
            ], ];
40
41
        return $this->httpGet('cgi-bin/appmsg', $query);
42
    }
43
}
44