$app
$app : \EasyWeChat\Kernel\ServiceContainer
Class Client.
$app : \EasyWeChat\Kernel\ServiceContainer
$accessToken : \EasyWeChat\Kernel\Contracts\AccessTokenInterface
__construct(\EasyWeChat\Kernel\ServiceContainer $app, \EasyWeChat\Kernel\Contracts\AccessTokenInterface|null $accessToken = null)
BaseClient constructor.
\EasyWeChat\Kernel\ServiceContainer | $app | |
\EasyWeChat\Kernel\Contracts\AccessTokenInterface|null | $accessToken |
httpGet(string $url, array $query = array()) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
GET request.
string | $url | |
array | $query |
httpPost(string $url, array $data = array()) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
POST request.
string | $url | |
array | $data |
httpPostJson(string $url, string|array $data = array(), array $query = array()) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
JSON request.
string | $url | |
string|array | $data | |
array | $query |
httpUpload(string $url, array $files = array(), array $form = array(), array $query = array()) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Upload file.
string | $url | |
array | $files | |
array | $form | |
array | $query |
getAccessToken() : \EasyWeChat\Kernel\Contracts\AccessTokenInterface
setAccessToken(\EasyWeChat\Kernel\Contracts\AccessTokenInterface $accessToken) : $this
\EasyWeChat\Kernel\Contracts\AccessTokenInterface | $accessToken |
request(string $url, string $method = 'GET', array $options = array()) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Make a request.
string | $url | |
string | $method | |
array | $options |
requestRaw(string $url, string $method = 'GET', array $options = array()) : \EasyWeChat\Kernel\Http\Response
string | $url | |
string | $method | |
array | $options |
message(string $deviceId, string $openid, string $content) : array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
string | $deviceId | |
string | $openid | |
string | $content |
qrCode(array $deviceIds) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Get device qrcode.
array | $deviceIds |
authorize(array $devices, string $productId, integer $opType) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
array | $devices | |
string | $productId | |
integer | $opType |
createId(string $productId) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
获取 device id 和二维码
string | $productId |
bind(string $openid, string $deviceId, string $ticket) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $openid | |
string | $deviceId | |
string | $ticket |
unbind(string $openid, string $deviceId, string $ticket) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $openid | |
string | $deviceId | |
string | $ticket |
forceBind(string $openid, string $deviceId) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $openid | |
string | $deviceId |
forceUnbind(string $openid, string $deviceId) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $openid | |
string | $deviceId |
status(string $deviceId) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $deviceId |
verify(string $ticket) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $ticket |
openid(string $deviceId) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $deviceId |
listByOpenid(string $openid) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $openid |