Agent.php
813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace WeWork\Api;
use WeWork\Traits\AgentIdTrait;
use WeWork\Traits\HttpClientTrait;
class Agent
{
use HttpClientTrait, AgentIdTrait;
/**
* 获取应用
*
* @return array
*/
public function get(): array
{
return $this->httpClient->get('agent/get', ['agentid' => $this->agentId]);
}
/**
* 设置应用
*
* @param array $json
* @return array
*/
public function set(array $json): array
{
return $this->httpClient->postJson('agent/set', array_merge(['agentid' => $this->agentId], $json));
}
/**
* 获取应用列表
*
* @return array
*/
public function list(): array
{
return $this->httpClient->get('agent/list');
}
}