GET
GET = 'get'
Class Staff.
$http : \EasyWeChat\Core\Http
Http instance.
$accessToken : \EasyWeChat\Core\AccessToken
The request token.
__construct(\EasyWeChat\Core\AccessToken $accessToken)
Constructor.
\EasyWeChat\Core\AccessToken | $accessToken |
getHttp() : \EasyWeChat\Core\Http
Return the http instance.
setHttp(\EasyWeChat\Core\Http $http) : $this
Set the http instance.
\EasyWeChat\Core\Http | $http |
getAccessToken() : \EasyWeChat\Core\AccessToken
Return the current accessToken.
setAccessToken(\EasyWeChat\Core\AccessToken $accessToken) : $this
Set the request token.
\EasyWeChat\Core\AccessToken | $accessToken |
parseJSON(string $method, array $args) : \EasyWeChat\Support\Collection
Parse JSON from response and check error.
string | $method | |
array | $args |
| null
lists() : \EasyWeChat\Support\Collection
List all staffs.
onlines() : \EasyWeChat\Support\Collection
List all online staffs.
create(string $account, string $nickname) : \EasyWeChat\Support\Collection
Create a staff.
string | $account | |
string | $nickname |
update(string $account, string $nickname) : \EasyWeChat\Support\Collection
Update a staff.
string | $account | |
string | $nickname |
delete(string $account) : \EasyWeChat\Support\Collection
Delete a staff.
string | $account |
invite(string $account, string $wechatId) : \EasyWeChat\Support\Collection
Invite a staff.
string | $account | |
string | $wechatId |
avatar(string $account, string $path) : \EasyWeChat\Support\Collection
Set staff avatar.
string | $account | |
string | $path |
message(\EasyWeChat\Message\AbstractMessage|string $message) : \EasyWeChat\Staff\MessageBuilder
Get message builder.
\EasyWeChat\Message\AbstractMessage|string | $message |
send(string|array $message) : \EasyWeChat\Support\Collection
Send a message.
string|array | $message |
records(integer $startTime, integer $endTime, integer $page = 1, integer $pageSize = 10) : \EasyWeChat\Support\Collection
Get staff session history.
integer | $startTime | |
integer | $endTime | |
integer | $page | |
integer | $pageSize |
messages(integer $startTime, integer $endTime, integer $msgId = 1, integer $number = 10000) : \EasyWeChat\Support\Collection
获取聊天记录.
integer | $startTime | |
integer | $endTime | |
integer | $msgId | |
integer | $number |