mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-15 10:12:28 +08:00
[feature] Format the code and improve Mini Program authorization to o… (#473)
* [feature] Format the code and improve Mini Program authorization to obtain openid(miniprogram/auth/auth.go Code2Session) * [feature] CheckEncryptedData (https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/user-info/auth.checkEncryptedData.html) * upgrade json error * upgrade json error Co-authored-by: houseme <houseme@outlook.com>
This commit is contained in:
@@ -15,7 +15,7 @@ const (
|
||||
getUserShareHour = "https://api.weixin.qq.com/datacube/getusersharehour"
|
||||
)
|
||||
|
||||
//ResArticleSummary 获取图文群发每日数据响应
|
||||
// ResArticleSummary 获取图文群发每日数据响应
|
||||
type ResArticleSummary struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -34,7 +34,7 @@ type ResArticleSummary struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResArticleTotal 获取图文群发总数据响应
|
||||
// ResArticleTotal 获取图文群发总数据响应
|
||||
type ResArticleTotal struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -46,7 +46,7 @@ type ResArticleTotal struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ArticleTotalDetails 获取图文群发总数据响应文字详情
|
||||
// ArticleTotalDetails 获取图文群发总数据响应文字详情
|
||||
type ArticleTotalDetails struct {
|
||||
StatDate string `json:"stat_date"`
|
||||
TargetUser int `json:"target_user"`
|
||||
@@ -76,7 +76,7 @@ type ArticleTotalDetails struct {
|
||||
FeedShareFromOtherCnt int `json:"feed_share_from_other_cnt"`
|
||||
}
|
||||
|
||||
//ResUserRead 获取图文统计数据响应
|
||||
// ResUserRead 获取图文统计数据响应
|
||||
type ResUserRead struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -94,7 +94,7 @@ type ResUserRead struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUserReadHour 获取图文统计分时数据
|
||||
// ResUserReadHour 获取图文统计分时数据
|
||||
type ResUserReadHour struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -113,7 +113,7 @@ type ResUserReadHour struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUserShare 获取图文分享转发数据
|
||||
// ResUserShare 获取图文分享转发数据
|
||||
type ResUserShare struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -125,7 +125,7 @@ type ResUserShare struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUserShareHour 获取图文分享转发分时数据
|
||||
// ResUserShareHour 获取图文分享转发分时数据
|
||||
type ResUserShareHour struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -138,7 +138,7 @@ type ResUserShareHour struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//GetArticleSummary 获取图文群发每日数据
|
||||
// GetArticleSummary 获取图文群发每日数据
|
||||
func (cube *DataCube) GetArticleSummary(s string, e string) (resArticleSummary ResArticleSummary, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -160,7 +160,7 @@ func (cube *DataCube) GetArticleSummary(s string, e string) (resArticleSummary R
|
||||
return
|
||||
}
|
||||
|
||||
//GetArticleTotal 获取图文群发总数据
|
||||
// GetArticleTotal 获取图文群发总数据
|
||||
func (cube *DataCube) GetArticleTotal(s string, e string) (resArticleTotal ResArticleTotal, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -182,7 +182,7 @@ func (cube *DataCube) GetArticleTotal(s string, e string) (resArticleTotal ResAr
|
||||
return
|
||||
}
|
||||
|
||||
//GetUserRead 获取图文统计数据
|
||||
// GetUserRead 获取图文统计数据
|
||||
func (cube *DataCube) GetUserRead(s string, e string) (resUserRead ResUserRead, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -204,7 +204,7 @@ func (cube *DataCube) GetUserRead(s string, e string) (resUserRead ResUserRead,
|
||||
return
|
||||
}
|
||||
|
||||
//GetUserReadHour 获取图文统计分时数据
|
||||
// GetUserReadHour 获取图文统计分时数据
|
||||
func (cube *DataCube) GetUserReadHour(s string, e string) (resUserReadHour ResUserReadHour, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -226,7 +226,7 @@ func (cube *DataCube) GetUserReadHour(s string, e string) (resUserReadHour ResUs
|
||||
return
|
||||
}
|
||||
|
||||
//GetUserShare 获取图文分享转发数据
|
||||
// GetUserShare 获取图文分享转发数据
|
||||
func (cube *DataCube) GetUserShare(s string, e string) (resUserShare ResUserShare, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -248,7 +248,7 @@ func (cube *DataCube) GetUserShare(s string, e string) (resUserShare ResUserShar
|
||||
return
|
||||
}
|
||||
|
||||
//GetUserShareHour 获取图文分享转发分时数据
|
||||
// GetUserShareHour 获取图文分享转发分时数据
|
||||
func (cube *DataCube) GetUserShareHour(s string, e string) (resUserShareHour ResUserShareHour, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
|
||||
@@ -9,12 +9,12 @@ type reqDate struct {
|
||||
EndDate string `json:"end_date"`
|
||||
}
|
||||
|
||||
//DataCube 数据统计
|
||||
// DataCube 数据统计
|
||||
type DataCube struct {
|
||||
*context.Context
|
||||
}
|
||||
|
||||
//NewCube 数据统计
|
||||
// NewCube 数据统计
|
||||
func NewCube(context *context.Context) *DataCube {
|
||||
dataCube := new(DataCube)
|
||||
dataCube.Context = context
|
||||
|
||||
@@ -11,7 +11,7 @@ const (
|
||||
getInterfaceSummaryHour = "https://api.weixin.qq.com/datacube/getinterfacesummaryhour"
|
||||
)
|
||||
|
||||
//ResInterfaceSummary 接口分析数据响应
|
||||
// ResInterfaceSummary 接口分析数据响应
|
||||
type ResInterfaceSummary struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -24,7 +24,7 @@ type ResInterfaceSummary struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResInterfaceSummaryHour 接口分析分时数据响应
|
||||
// ResInterfaceSummaryHour 接口分析分时数据响应
|
||||
type ResInterfaceSummaryHour struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -38,7 +38,7 @@ type ResInterfaceSummaryHour struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//GetInterfaceSummary 获取接口分析数据
|
||||
// GetInterfaceSummary 获取接口分析数据
|
||||
func (cube *DataCube) GetInterfaceSummary(s string, e string) (resInterfaceSummary ResInterfaceSummary, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -60,7 +60,7 @@ func (cube *DataCube) GetInterfaceSummary(s string, e string) (resInterfaceSumma
|
||||
return
|
||||
}
|
||||
|
||||
//GetInterfaceSummaryHour 获取接口分析分时数据
|
||||
// GetInterfaceSummaryHour 获取接口分析分时数据
|
||||
func (cube *DataCube) GetInterfaceSummaryHour(s string, e string) (resInterfaceSummaryHour ResInterfaceSummaryHour, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
|
||||
@@ -16,7 +16,7 @@ const (
|
||||
getUpstreamMsgDistMonth = "https://api.weixin.qq.com/datacube/getupstreammsgdistmonth"
|
||||
)
|
||||
|
||||
//ResUpstreamMsg 获取消息发送概况数据响应
|
||||
// ResUpstreamMsg 获取消息发送概况数据响应
|
||||
type ResUpstreamMsg struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -28,7 +28,7 @@ type ResUpstreamMsg struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUpstreamMsgHour 获取消息分送分时数据响应
|
||||
// ResUpstreamMsgHour 获取消息分送分时数据响应
|
||||
type ResUpstreamMsgHour struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -41,7 +41,7 @@ type ResUpstreamMsgHour struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUpstreamMsgWeek 获取消息发送周数据响应
|
||||
// ResUpstreamMsgWeek 获取消息发送周数据响应
|
||||
type ResUpstreamMsgWeek struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -53,7 +53,7 @@ type ResUpstreamMsgWeek struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUpstreamMsgMonth 获取消息发送月数据响应
|
||||
// ResUpstreamMsgMonth 获取消息发送月数据响应
|
||||
type ResUpstreamMsgMonth struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -65,7 +65,7 @@ type ResUpstreamMsgMonth struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUpstreamMsgDist 获取消息发送分布数据响应
|
||||
// ResUpstreamMsgDist 获取消息发送分布数据响应
|
||||
type ResUpstreamMsgDist struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -76,7 +76,7 @@ type ResUpstreamMsgDist struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUpstreamMsgDistWeek 获取消息发送分布周数据响应
|
||||
// ResUpstreamMsgDistWeek 获取消息发送分布周数据响应
|
||||
type ResUpstreamMsgDistWeek struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -87,7 +87,7 @@ type ResUpstreamMsgDistWeek struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUpstreamMsgDistMonth 获取消息发送分布月数据响应
|
||||
// ResUpstreamMsgDistMonth 获取消息发送分布月数据响应
|
||||
type ResUpstreamMsgDistMonth struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -98,7 +98,7 @@ type ResUpstreamMsgDistMonth struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//GetUpstreamMsg 获取消息发送概况数据
|
||||
// GetUpstreamMsg 获取消息发送概况数据
|
||||
func (cube *DataCube) GetUpstreamMsg(s string, e string) (resUpstreamMsg ResUpstreamMsg, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -120,7 +120,7 @@ func (cube *DataCube) GetUpstreamMsg(s string, e string) (resUpstreamMsg ResUpst
|
||||
return
|
||||
}
|
||||
|
||||
//GetUpstreamMsgHour 获取消息分送分时数据
|
||||
// GetUpstreamMsgHour 获取消息分送分时数据
|
||||
func (cube *DataCube) GetUpstreamMsgHour(s string, e string) (resUpstreamMsgHour ResUpstreamMsgHour, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -142,7 +142,7 @@ func (cube *DataCube) GetUpstreamMsgHour(s string, e string) (resUpstreamMsgHour
|
||||
return
|
||||
}
|
||||
|
||||
//GetUpstreamMsgWeek 获取消息发送周数据
|
||||
// GetUpstreamMsgWeek 获取消息发送周数据
|
||||
func (cube *DataCube) GetUpstreamMsgWeek(s string, e string) (resUpstreamMsgWeek ResUpstreamMsgWeek, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -164,7 +164,7 @@ func (cube *DataCube) GetUpstreamMsgWeek(s string, e string) (resUpstreamMsgWeek
|
||||
return
|
||||
}
|
||||
|
||||
//GetUpstreamMsgMonth 获取消息发送月数据
|
||||
// GetUpstreamMsgMonth 获取消息发送月数据
|
||||
func (cube *DataCube) GetUpstreamMsgMonth(s string, e string) (resUpstreamMsgMonth ResUpstreamMsgMonth, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -186,7 +186,7 @@ func (cube *DataCube) GetUpstreamMsgMonth(s string, e string) (resUpstreamMsgMon
|
||||
return
|
||||
}
|
||||
|
||||
//GetUpstreamMsgDist 获取消息发送分布数据
|
||||
// GetUpstreamMsgDist 获取消息发送分布数据
|
||||
func (cube *DataCube) GetUpstreamMsgDist(s string, e string) (resUpstreamMsgDist ResUpstreamMsgDist, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -208,7 +208,7 @@ func (cube *DataCube) GetUpstreamMsgDist(s string, e string) (resUpstreamMsgDist
|
||||
return
|
||||
}
|
||||
|
||||
//GetUpstreamMsgDistWeek 获取消息发送分布周数据
|
||||
// GetUpstreamMsgDistWeek 获取消息发送分布周数据
|
||||
func (cube *DataCube) GetUpstreamMsgDistWeek(s string, e string) (resUpstreamMsgDistWeek ResUpstreamMsgDistWeek, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -230,7 +230,7 @@ func (cube *DataCube) GetUpstreamMsgDistWeek(s string, e string) (resUpstreamMsg
|
||||
return
|
||||
}
|
||||
|
||||
//GetUpstreamMsgDistMonth 获取消息发送分布月数据
|
||||
// GetUpstreamMsgDistMonth 获取消息发送分布月数据
|
||||
func (cube *DataCube) GetUpstreamMsgDistMonth(s string, e string) (resUpstreamMsgDistMonth ResUpstreamMsgDistMonth, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
|
||||
@@ -8,31 +8,31 @@ import (
|
||||
"github.com/silenceper/wechat/v2/util"
|
||||
)
|
||||
|
||||
//AdSlot 广告位类型
|
||||
// AdSlot 广告位类型
|
||||
type AdSlot string
|
||||
|
||||
const (
|
||||
//SlotIDBizBottom 公众号底部广告
|
||||
// SlotIDBizBottom 公众号底部广告
|
||||
SlotIDBizBottom AdSlot = "SLOT_ID_BIZ_BOTTOM"
|
||||
//SlotIDBizMidContext 公众号文中广告
|
||||
// SlotIDBizMidContext 公众号文中广告
|
||||
SlotIDBizMidContext AdSlot = "SLOT_ID_BIZ_MID_CONTEXT"
|
||||
//SlotIDBizVideoEnd 公众号视频后贴
|
||||
// SlotIDBizVideoEnd 公众号视频后贴
|
||||
SlotIDBizVideoEnd AdSlot = "SLOT_ID_BIZ_VIDEO_END"
|
||||
//SlotIDBizSponsor 公众号互选广告
|
||||
// SlotIDBizSponsor 公众号互选广告
|
||||
SlotIDBizSponsor AdSlot = "SLOT_ID_BIZ_SPONSOR"
|
||||
//SlotIDBizCps 公众号返佣商品
|
||||
// SlotIDBizCps 公众号返佣商品
|
||||
SlotIDBizCps AdSlot = "SLOT_ID_BIZ_CPS"
|
||||
//SlotIDWeappBanner 小程序banner
|
||||
// SlotIDWeappBanner 小程序banner
|
||||
SlotIDWeappBanner AdSlot = "SLOT_ID_WEAPP_BANNER"
|
||||
//SlotIDWeappRewardVideo 小程序激励视频
|
||||
// SlotIDWeappRewardVideo 小程序激励视频
|
||||
SlotIDWeappRewardVideo AdSlot = "SLOT_ID_WEAPP_REWARD_VIDEO"
|
||||
//SlotIDWeappInterstitial 小程序插屏广告
|
||||
// SlotIDWeappInterstitial 小程序插屏广告
|
||||
SlotIDWeappInterstitial AdSlot = "SLOT_ID_WEAPP_INTERSTITIAL"
|
||||
//SlotIDWeappVideoFeeds 小程序视频广告
|
||||
// SlotIDWeappVideoFeeds 小程序视频广告
|
||||
SlotIDWeappVideoFeeds AdSlot = "SLOT_ID_WEAPP_VIDEO_FEEDS"
|
||||
//SlotIDWeappVideoBegin 小程序视频前贴
|
||||
// SlotIDWeappVideoBegin 小程序视频前贴
|
||||
SlotIDWeappVideoBegin AdSlot = "SLOT_ID_WEAPP_VIDEO_BEGIN"
|
||||
//SlotIDWeappBox 小程序格子广告
|
||||
// SlotIDWeappBox 小程序格子广告
|
||||
SlotIDWeappBox AdSlot = "SLOT_ID_WEAPP_BOX"
|
||||
)
|
||||
|
||||
@@ -46,13 +46,13 @@ const (
|
||||
actionPublisherSettlement = "publisher_settlement"
|
||||
)
|
||||
|
||||
//BaseResp 错误信息
|
||||
// BaseResp 错误信息
|
||||
type BaseResp struct {
|
||||
ErrMsg string `json:"err_msg"`
|
||||
Ret int `json:"ret"`
|
||||
}
|
||||
|
||||
//ResPublisherAdPos 公众号分广告位数据响应
|
||||
// ResPublisherAdPos 公众号分广告位数据响应
|
||||
type ResPublisherAdPos struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -62,7 +62,7 @@ type ResPublisherAdPos struct {
|
||||
TotalNum int `json:"total_num"`
|
||||
}
|
||||
|
||||
//ResAdPosList 公众号分广告位列表
|
||||
// ResAdPosList 公众号分广告位列表
|
||||
type ResAdPosList struct {
|
||||
SlotID int64 `json:"slot_id"`
|
||||
AdSlot string `json:"ad_slot"`
|
||||
@@ -76,7 +76,7 @@ type ResAdPosList struct {
|
||||
Ecpm float64 `json:"ecpm"`
|
||||
}
|
||||
|
||||
//ResAdPosSummary 公众号分广告位概览
|
||||
// ResAdPosSummary 公众号分广告位概览
|
||||
type ResAdPosSummary struct {
|
||||
ReqSuccCount int `json:"req_succ_count"`
|
||||
ExposureCount int `json:"exposure_count"`
|
||||
@@ -87,7 +87,7 @@ type ResAdPosSummary struct {
|
||||
Ecpm float64 `json:"ecpm"`
|
||||
}
|
||||
|
||||
//ResPublisherCps 公众号返佣商品数据响应
|
||||
// ResPublisherCps 公众号返佣商品数据响应
|
||||
type ResPublisherCps struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -97,7 +97,7 @@ type ResPublisherCps struct {
|
||||
TotalNum int `json:"total_num"`
|
||||
}
|
||||
|
||||
//ResCpsList 公众号返佣商品列表
|
||||
// ResCpsList 公众号返佣商品列表
|
||||
type ResCpsList struct {
|
||||
Date string `json:"date"`
|
||||
ExposureCount int `json:"exposure_count"`
|
||||
@@ -109,7 +109,7 @@ type ResCpsList struct {
|
||||
TotalCommission int `json:"total_commission"`
|
||||
}
|
||||
|
||||
//ResCpsSummary 公众号返佣概览
|
||||
// ResCpsSummary 公众号返佣概览
|
||||
type ResCpsSummary struct {
|
||||
ExposureCount int `json:"exposure_count"`
|
||||
ClickCount int `json:"click_count"`
|
||||
@@ -120,7 +120,7 @@ type ResCpsSummary struct {
|
||||
TotalCommission int `json:"total_commission"`
|
||||
}
|
||||
|
||||
//ResPublisherSettlement 公众号结算收入数据及结算主体信息响应
|
||||
// ResPublisherSettlement 公众号结算收入数据及结算主体信息响应
|
||||
type ResPublisherSettlement struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -133,7 +133,7 @@ type ResPublisherSettlement struct {
|
||||
TotalNum int `json:"total_num"`
|
||||
}
|
||||
|
||||
//SettlementList 结算单列表
|
||||
// SettlementList 结算单列表
|
||||
type SettlementList struct {
|
||||
Date string `json:"date"`
|
||||
Zone string `json:"zone"`
|
||||
@@ -146,13 +146,13 @@ type SettlementList struct {
|
||||
SlotRevenue []SlotRevenue `json:"slot_revenue"`
|
||||
}
|
||||
|
||||
//SlotRevenue 产生收入的广告
|
||||
// SlotRevenue 产生收入的广告
|
||||
type SlotRevenue struct {
|
||||
SlotID string `json:"slot_id"`
|
||||
SlotSettledRevenue int `json:"slot_settled_revenue"`
|
||||
}
|
||||
|
||||
//ParamsPublisher 拉取数据参数
|
||||
// ParamsPublisher 拉取数据参数
|
||||
type ParamsPublisher struct {
|
||||
Action string `json:"action"`
|
||||
StartDate string `json:"start_date"`
|
||||
@@ -189,7 +189,7 @@ func (cube *DataCube) fetchData(params ParamsPublisher) (response []byte, err er
|
||||
return
|
||||
}
|
||||
|
||||
//GetPublisherAdPosGeneral 获取公众号分广告位数据
|
||||
// GetPublisherAdPosGeneral 获取公众号分广告位数据
|
||||
func (cube *DataCube) GetPublisherAdPosGeneral(startDate, endDate string, page, pageSize int, adSlot AdSlot) (resPublisherAdPos ResPublisherAdPos, err error) {
|
||||
params := ParamsPublisher{
|
||||
Action: actionPublisherAdPosGeneral,
|
||||
@@ -217,7 +217,7 @@ func (cube *DataCube) GetPublisherAdPosGeneral(startDate, endDate string, page,
|
||||
return
|
||||
}
|
||||
|
||||
//GetPublisherCpsGeneral 获取公众号返佣商品数据
|
||||
// GetPublisherCpsGeneral 获取公众号返佣商品数据
|
||||
func (cube *DataCube) GetPublisherCpsGeneral(startDate, endDate string, page, pageSize int) (resPublisherCps ResPublisherCps, err error) {
|
||||
params := ParamsPublisher{
|
||||
Action: actionPublisherCpsGeneral,
|
||||
@@ -244,7 +244,7 @@ func (cube *DataCube) GetPublisherCpsGeneral(startDate, endDate string, page, pa
|
||||
return
|
||||
}
|
||||
|
||||
//GetPublisherSettlement 获取公众号结算收入数据及结算主体信息
|
||||
// GetPublisherSettlement 获取公众号结算收入数据及结算主体信息
|
||||
func (cube *DataCube) GetPublisherSettlement(startDate, endDate string, page, pageSize int) (resPublisherSettlement ResPublisherSettlement, err error) {
|
||||
params := ParamsPublisher{
|
||||
Action: actionPublisherSettlement,
|
||||
|
||||
@@ -11,7 +11,7 @@ const (
|
||||
getUserAccumulate = "https://api.weixin.qq.com/datacube/getusercumulate"
|
||||
)
|
||||
|
||||
//ResUserSummary 获取用户增减数据响应
|
||||
// ResUserSummary 获取用户增减数据响应
|
||||
type ResUserSummary struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -23,7 +23,7 @@ type ResUserSummary struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//ResUserAccumulate 获取累计用户数据响应
|
||||
// ResUserAccumulate 获取累计用户数据响应
|
||||
type ResUserAccumulate struct {
|
||||
util.CommonError
|
||||
|
||||
@@ -33,7 +33,7 @@ type ResUserAccumulate struct {
|
||||
} `json:"list"`
|
||||
}
|
||||
|
||||
//GetUserSummary 获取用户增减数据
|
||||
// GetUserSummary 获取用户增减数据
|
||||
func (cube *DataCube) GetUserSummary(s string, e string) (resUserSummary ResUserSummary, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
@@ -55,7 +55,7 @@ func (cube *DataCube) GetUserSummary(s string, e string) (resUserSummary ResUser
|
||||
return
|
||||
}
|
||||
|
||||
//GetUserAccumulate 获取累计用户数据
|
||||
// GetUserAccumulate 获取累计用户数据
|
||||
func (cube *DataCube) GetUserAccumulate(s string, e string) (resUserAccumulate ResUserAccumulate, err error) {
|
||||
accessToken, err := cube.GetAccessToken()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user