Client   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 11
c 1
b 0
f 1
dl 0
loc 41
ccs 10
cts 10
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRooms() 0 8 1
A getPlaybacks() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[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 EasyWeChat\MiniProgram\Live;
13
14
use EasyWeChat\Kernel\BaseClient;
15
16
/**
17
 * Class Client.
18
 *
19
 * @author onekb <[email protected]>
20
 */
21
class Client extends BaseClient
22
{
23
    /**
24
     * Get Room List.
25
     *
26
     * @param int $start
27
     * @param int $limit
28
     *
29
     * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
30
     * @deprecated This method has been merged into `\EasyWeChat\MiniProgram\Broadcast`
31
     */
32 2
    public function getRooms(int $start = 0, int $limit = 10)
33
    {
34
        $params = [
35 2
            'start' => $start,
36 2
            'limit' => $limit,
37
        ];
38
39 2
        return $this->httpPostJson('wxa/business/getliveinfo', $params);
40
    }
41
42
    /**
43
     * Get Playback List.
44
     *
45
     * @param int $roomId
46
     * @param int $start
47
     * @param int $limit
48
     *
49
     * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
50
     * @deprecated This method has been merged into `\EasyWeChat\MiniProgram\Broadcast`
51
     */
52 1
    public function getPlaybacks(int $roomId, int $start = 0, int $limit = 10)
53
    {
54
        $params = [
55 1
            'action' => 'get_replay',
56 1
            'room_id' => $roomId,
57 1
            'start' => $start,
58 1
            'limit' => $limit,
59
        ];
60
61 1
        return $this->httpPostJson('wxa/business/getliveinfo', $params);
62
    }
63
}
64