$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 |
uploadImage( $path) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Upload image.
$path |
uploadVideo( $path) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Upload video.
$path |
uploadVoice(string $path) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $path |
uploadThumb( $path) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
$path |
upload(string $type, string $path) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Upload temporary material.
string | $type | |
string | $path |
uploadVideoForBroadcasting(string $path, string $title, string $description) : array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
string | $path | |
string | $title | |
string | $description |
createVideoForBroadcasting(string $mediaId, string $title, string $description) : \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
string | $mediaId | |
string | $title | |
string | $description |
get(string $mediaId) : \EasyWeChat\Kernel\Http\StreamResponse|\Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
Fetch item from WeChat server.
string | $mediaId |
getJssdkMedia(string $mediaId) : array|\EasyWeChat\Kernel\Http\Response|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
string | $mediaId |