$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 |
get(string $path, array $optional = array()) : \EasyWeChat\Kernel\Http\StreamResponse
Get AppCode.
| string | $path | |
| array | $optional |
getUnlimit(string $scene, array $optional = array()) : \EasyWeChat\Kernel\Http\StreamResponse
Get AppCode unlimit.
| string | $scene | |
| array | $optional |
getQrCode(string $path, integer|null $width = null) : \EasyWeChat\Kernel\Http\StreamResponse
Create QrCode.
| string | $path | |
| integer|null | $width |
getStream(string $endpoint, array $params) : \EasyWeChat\Kernel\Http\StreamResponse
Get stream.
| string | $endpoint | |
| array | $params |