for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace EntWeChat\Agent;
use EntWeChat\Core\AbstractAPI;
/**
* Class Agent.
*/
class Agent extends AbstractAPI
{
const API_GET = 'https://qyapi.weixin.qq.com/cgi-bin/agent/get';
const API_SET = 'https://qyapi.weixin.qq.com/cgi-bin/agent/set';
const API_LIST = 'https://qyapi.weixin.qq.com/cgi-bin/agent/list';
* Fetch an agent by agent id.
*
* @param int $agentId
* @return \EntWeChat\Support\Collection
public function get($agentId)
$params = [
'agentid' => $agentId,
];
return $this->parseJSON('get', [self::API_GET, $params]);
}
* Set an agent by agent id.
* @param array $agentInfo
public function set($agentId, array $agentInfo = [])
$params = array_merge($agentInfo, [
]);
return $this->parseJSON('json', [self::API_SET, $params]);
* List agents.
public function lists()
return $this->parseJSON('get', [self::API_LIST]);