Constants

GET

GET = 'get'

POST

POST = 'post'

JSON

JSON = 'json'

API_ACCOUNT_REGISTER

API_ACCOUNT_REGISTER = 'https://api.weixin.qq.com/shakearound/account/register'

API_ACCOUNT_AUDIT_STATUS

API_ACCOUNT_AUDIT_STATUS = 'https://api.weixin.qq.com/shakearound/account/auditstatus'

API_GET_SHAKE_INFO

API_GET_SHAKE_INFO = 'https://api.weixin.qq.com/shakearound/user/getshakeinfo'

Properties

$maxRetries

$maxRetries : integer

Type

integer

Methods

setHttp()

setHttp(\EasyWeChat\Core\Http  $http) : $this

Set the http instance.

Parameters

\EasyWeChat\Core\Http $http

Returns

$this

setAccessToken()

setAccessToken(\EasyWeChat\Core\AccessToken  $accessToken) : $this

Set the request token.

Parameters

\EasyWeChat\Core\AccessToken $accessToken

Returns

$this

maxRetries()

maxRetries(integer  $retries) 

Parameters

integer $retries

parseJSON()

parseJSON(string  $method, array  $args) : \EasyWeChat\Support\Collection

Parse JSON from response and check error.

Parameters

string $method
array $args

Throws

\EasyWeChat\Core\Exceptions\HttpException

Returns

\EasyWeChat\Support\Collection

| null

register()

register(string  $name, string  $tel, string  $email, string  $industryId, array  $certUrls, string  $reason = '') : \EasyWeChat\Support\Collection

Register shake around.

Parameters

string $name
string $tel
string $email
string $industryId
array $certUrls
string $reason

Returns

\EasyWeChat\Support\Collection

getShakeInfo()

getShakeInfo(string  $ticket, integer  $needPoi = null) : \EasyWeChat\Support\Collection

Get shake info.

Parameters

string $ticket
integer $needPoi

Returns

\EasyWeChat\Support\Collection

registerHttpMiddlewares()

registerHttpMiddlewares() 

Register Guzzle middlewares.

accessTokenMiddleware()

accessTokenMiddleware() : \Closure

Attache access token to request query.

Returns

\Closure

logMiddleware()

logMiddleware() : \Closure

Log the request.

Returns

\Closure

retryMiddleware()

retryMiddleware() : \Closure

Return retry middleware.

Returns

\Closure

checkAndThrow()

checkAndThrow(array  $contents) 

Check the array data errors, and Throw exception when the contents contains error.

Parameters

array $contents

Throws

\EasyWeChat\Core\Exceptions\HttpException