1 | <?php |
||
16 | class BaseIMCloud |
||
17 | { |
||
18 | /** |
||
19 | * @var ServiceContainer |
||
20 | */ |
||
21 | protected $app; |
||
22 | |||
23 | /** |
||
24 | * AbstractTimSDKAPI constructor. |
||
25 | * @param ServiceContainer $app |
||
26 | */ |
||
27 | 6 | public function __construct(ServiceContainer $app) |
|
33 | |||
34 | /** |
||
35 | * Init |
||
36 | */ |
||
37 | public function initialize() |
||
40 | |||
41 | /** |
||
42 | * POST request. |
||
43 | * |
||
44 | * @param $uri |
||
45 | * @param array $data |
||
46 | * @param array $options |
||
47 | * @return ResponseBag |
||
48 | */ |
||
49 | public function httpPost($uri, $data = [], $options = []) |
||
55 | |||
56 | /** |
||
57 | * JSON request. |
||
58 | * |
||
59 | * @param $uri |
||
60 | * @param array $data |
||
61 | * @param array $options |
||
62 | * @return ResponseBag |
||
63 | * @throws Exceptions\JsonParseException |
||
64 | */ |
||
65 | public function httpPostJson($uri, $data = [], $options = []) |
||
71 | |||
72 | /** |
||
73 | * @param string $method |
||
74 | * @param string $uri |
||
75 | * @param array $options |
||
76 | * @return ResponseBag |
||
77 | */ |
||
78 | public function request($uri, $method = 'GET', $options = []) |
||
91 | } |
||
92 |