Constants

GET

GET = 'get'

POST

POST = 'post'

JSON

JSON = 'json'

API_USER_SUMMARY

API_USER_SUMMARY = 'https://api.weixin.qq.com/datacube/getusersummary'

API_USER_CUMULATE

API_USER_CUMULATE = 'https://api.weixin.qq.com/datacube/getusercumulate'

API_ARTICLE_SUMMARY

API_ARTICLE_SUMMARY = 'https://api.weixin.qq.com/datacube/getarticlesummary'

API_ARTICLE_TOTAL

API_ARTICLE_TOTAL = 'https://api.weixin.qq.com/datacube/getarticletotal'

API_USER_READ_SUMMARY

API_USER_READ_SUMMARY = 'https://api.weixin.qq.com/datacube/getuserread'

API_USER_READ_HOURLY

API_USER_READ_HOURLY = 'https://api.weixin.qq.com/datacube/getuserreadhour'

API_USER_SHARE_SUMMARY

API_USER_SHARE_SUMMARY = 'https://api.weixin.qq.com/datacube/getusershare'

API_USER_SHARE_HOURLY

API_USER_SHARE_HOURLY = 'https://api.weixin.qq.com/datacube/getusersharehour'

API_UPSTREAM_MSG_SUMMARY

API_UPSTREAM_MSG_SUMMARY = 'https://api.weixin.qq.com/datacube/getupstreammsg'

API_UPSTREAM_MSG_HOURLY

API_UPSTREAM_MSG_HOURLY = 'https://api.weixin.qq.com/datacube/getupstreammsghour'

API_UPSTREAM_MSG_WEEKLY

API_UPSTREAM_MSG_WEEKLY = 'https://api.weixin.qq.com/datacube/getupstreammsgweek'

API_UPSTREAM_MSG_MONTHLY

API_UPSTREAM_MSG_MONTHLY = 'https://api.weixin.qq.com/datacube/getupstreammsgmonth'

API_UPSTREAM_MSG_DIST_SUMMARY

API_UPSTREAM_MSG_DIST_SUMMARY = 'https://api.weixin.qq.com/datacube/getupstreammsgdist'

API_UPSTREAM_MSG_DIST_WEEKLY

API_UPSTREAM_MSG_DIST_WEEKLY = 'https://api.weixin.qq.com/datacube/getupstreammsgdistweek'

API_UPSTREAM_MSG_DIST_MONTHLY

API_UPSTREAM_MSG_DIST_MONTHLY = 'https://api.weixin.qq.com/datacube/getupstreammsgdistmonth?'

API_INTERFACE_SUMMARY

API_INTERFACE_SUMMARY = 'https://api.weixin.qq.com/datacube/getinterfacesummary'

API_INTERFACE_SUMMARY_HOURLY

API_INTERFACE_SUMMARY_HOURLY = 'https://api.weixin.qq.com/datacube/getinterfacesummaryhour'

API_CARD_SUMMARY

API_CARD_SUMMARY = 'https://api.weixin.qq.com/datacube/getcardbizuininfo'

API_FREE_CARD_SUMMARY

API_FREE_CARD_SUMMARY = 'https://api.weixin.qq.com/datacube/getcardcardinfo'

API_MEMBER_CARD_SUMMARY

API_MEMBER_CARD_SUMMARY = 'https://api.weixin.qq.com/datacube/getcardmembercardinfo'

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

Returns

\EasyWeChat\Support\Collection

userSummary()

userSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取用户增减数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

userCumulate()

userCumulate(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取累计用户数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

articleSummary()

articleSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取图文群发每日数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

articleTotal()

articleTotal(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取图文群发总数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

userReadSummary()

userReadSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取图文统计数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

userReadHourly()

userReadHourly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取图文统计分时数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

userShareSummary()

userShareSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取图文分享转发数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

userShareHourly()

userShareHourly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取图文分享转发分时数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageSummary()

upstreamMessageSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息发送概况数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageHourly()

upstreamMessageHourly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息分送分时数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageWeekly()

upstreamMessageWeekly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息发送周数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageMonthly()

upstreamMessageMonthly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息发送月数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageDistSummary()

upstreamMessageDistSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息发送分布数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageDistWeekly()

upstreamMessageDistWeekly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息发送分布周数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

upstreamMessageDistMonthly()

upstreamMessageDistMonthly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取消息发送分布月数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

interfaceSummary()

interfaceSummary(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取接口分析数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

interfaceSummaryHourly()

interfaceSummaryHourly(string  $from, string  $to) : \EasyWeChat\Support\Collection

获取接口分析分时数据.

Parameters

string $from
string $to

Returns

\EasyWeChat\Support\Collection

cardSummary()

cardSummary(string  $from, string  $to, integer  $condSource) : \EasyWeChat\Support\Collection

拉取卡券概况数据接口.

Parameters

string $from
string $to
integer $condSource

Returns

\EasyWeChat\Support\Collection

freeCardSummary()

freeCardSummary(string  $from, string  $to, integer  $condSource, string  $cardId = '') : \EasyWeChat\Support\Collection

获取免费券数据接口.

Parameters

string $from
string $to
integer $condSource
string $cardId

Returns

\EasyWeChat\Support\Collection

memberCardSummary()

memberCardSummary(string  $from, string  $to, integer  $condSource) : \EasyWeChat\Support\Collection

拉取会员卡数据接口.

Parameters

string $from
string $to
integer $condSource

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

query()

query(string  $api, string  $from, string  $to, array  $ext = array()) : \EasyWeChat\Support\Collection

查询数据.

Parameters

string $api
string $from
string $to
array $ext

Returns

\EasyWeChat\Support\Collection