datacube

package
v2.1.4-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdSlot

type AdSlot string

AdSlot 广告位类型

const (
	// SlotIDBizBottom 公众号底部广告
	SlotIDBizBottom AdSlot = "SLOT_ID_BIZ_BOTTOM"
	// SlotIDBizMidContext 公众号文中广告
	SlotIDBizMidContext AdSlot = "SLOT_ID_BIZ_MID_CONTEXT"
	// SlotIDBizVideoEnd 公众号视频后贴
	SlotIDBizVideoEnd AdSlot = "SLOT_ID_BIZ_VIDEO_END"
	// SlotIDBizSponsor 公众号互选广告
	SlotIDBizSponsor AdSlot = "SLOT_ID_BIZ_SPONSOR"
	// SlotIDBizCps 公众号返佣商品
	SlotIDBizCps AdSlot = "SLOT_ID_BIZ_CPS"
	// SlotIDWeappBanner 小程序banner
	SlotIDWeappBanner AdSlot = "SLOT_ID_WEAPP_BANNER"
	// SlotIDWeappRewardVideo 小程序激励视频
	SlotIDWeappRewardVideo AdSlot = "SLOT_ID_WEAPP_REWARD_VIDEO"
	// SlotIDWeappInterstitial 小程序插屏广告
	SlotIDWeappInterstitial AdSlot = "SLOT_ID_WEAPP_INTERSTITIAL"
	// SlotIDWeappVideoFeeds 小程序视频广告
	SlotIDWeappVideoFeeds AdSlot = "SLOT_ID_WEAPP_VIDEO_FEEDS"
	// SlotIDWeappVideoBegin 小程序视频前贴
	SlotIDWeappVideoBegin AdSlot = "SLOT_ID_WEAPP_VIDEO_BEGIN"
	// SlotIDWeappBox 小程序格子广告
	SlotIDWeappBox AdSlot = "SLOT_ID_WEAPP_BOX"
)

type ArticleTotalDetails

type ArticleTotalDetails struct {
	StatDate                    string `json:"stat_date"`
	TargetUser                  int    `json:"target_user"`
	IntPageReadUser             int    `json:"int_page_read_user"`
	IntPageReadCount            int    `json:"int_page_read_count"`
	OriPageReadUser             int    `json:"ori_page_read_user"`
	OriPageReadCount            int    `json:"ori_page_read_count"`
	ShareUser                   int    `json:"share_user"`
	ShareCount                  int    `json:"share_count"`
	AddToFavUser                int    `json:"add_to_fav_user"`
	AddToFavCount               int    `json:"add_to_fav_count"`
	IntPageFromSessionReadUser  int    `json:"int_page_from_session_read_user"`
	IntPageFromSessionReadCount int    `json:"int_page_from_session_read_count"`
	IntPageFromHistMsgReadUser  int    `json:"int_page_from_hist_msg_read_user"`
	IntPageFromHistMsgReadCount int    `json:"int_page_from_hist_msg_read_count"`
	IntPageFromFeedReadUser     int    `json:"int_page_from_feed_read_user"`
	IntPageFromFeedReadCount    int    `json:"int_page_from_feed_read_count"`
	IntPageFromFriendsReadUser  int    `json:"int_page_from_friends_read_user"`
	IntPageFromFriendsReadCount int    `json:"int_page_from_friends_read_count"`
	IntPageFromOtherReadUser    int    `json:"int_page_from_other_read_user"`
	IntPageFromOtherReadCount   int    `json:"int_page_from_other_read_count"`
	FeedShareFromSessionUser    int    `json:"feed_share_from_session_user"`
	FeedShareFromSessionCnt     int    `json:"feed_share_from_session_cnt"`
	FeedShareFromFeedUser       int    `json:"feed_share_from_feed_user"`
	FeedShareFromFeedCnt        int    `json:"feed_share_from_feed_cnt"`
	FeedShareFromOtherUser      int    `json:"feed_share_from_other_user"`
	FeedShareFromOtherCnt       int    `json:"feed_share_from_other_cnt"`
}

ArticleTotalDetails 获取图文群发总数据响应文字详情

type BaseResp

type BaseResp struct {
	ErrMsg string `json:"err_msg"`
	Ret    int    `json:"ret"`
}

BaseResp 错误信息

type DataCube

type DataCube struct {
	*context.Context
}

DataCube 数据统计

func NewCube

func NewCube(context *context.Context) *DataCube

NewCube 数据统计

func (*DataCube) GetArticleSummary

func (cube *DataCube) GetArticleSummary(s string, e string) (resArticleSummary ResArticleSummary, err error)

GetArticleSummary 获取图文群发每日数据

func (*DataCube) GetArticleTotal

func (cube *DataCube) GetArticleTotal(s string, e string) (resArticleTotal ResArticleTotal, err error)

GetArticleTotal 获取图文群发总数据

func (*DataCube) GetInterfaceSummary

func (cube *DataCube) GetInterfaceSummary(s string, e string) (resInterfaceSummary ResInterfaceSummary, err error)

GetInterfaceSummary 获取接口分析数据

func (*DataCube) GetInterfaceSummaryHour

func (cube *DataCube) GetInterfaceSummaryHour(s string, e string) (resInterfaceSummaryHour ResInterfaceSummaryHour, err error)

GetInterfaceSummaryHour 获取接口分析分时数据

func (*DataCube) GetPublisherAdPosGeneral

func (cube *DataCube) GetPublisherAdPosGeneral(startDate, endDate string, page, pageSize int, adSlot AdSlot) (resPublisherAdPos ResPublisherAdPos, err error)

GetPublisherAdPosGeneral 获取公众号分广告位数据

func (*DataCube) GetPublisherCpsGeneral

func (cube *DataCube) GetPublisherCpsGeneral(startDate, endDate string, page, pageSize int) (resPublisherCps ResPublisherCps, err error)

GetPublisherCpsGeneral 获取公众号返佣商品数据

func (*DataCube) GetPublisherSettlement

func (cube *DataCube) GetPublisherSettlement(startDate, endDate string, page, pageSize int) (resPublisherSettlement ResPublisherSettlement, err error)

GetPublisherSettlement 获取公众号结算收入数据及结算主体信息

func (*DataCube) GetUpstreamMsg

func (cube *DataCube) GetUpstreamMsg(s string, e string) (resUpstreamMsg ResUpstreamMsg, err error)

GetUpstreamMsg 获取消息发送概况数据

func (*DataCube) GetUpstreamMsgDist

func (cube *DataCube) GetUpstreamMsgDist(s string, e string) (resUpstreamMsgDist ResUpstreamMsgDist, err error)

GetUpstreamMsgDist 获取消息发送分布数据

func (*DataCube) GetUpstreamMsgDistMonth

func (cube *DataCube) GetUpstreamMsgDistMonth(s string, e string) (resUpstreamMsgDistMonth ResUpstreamMsgDistMonth, err error)

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

func (*DataCube) GetUpstreamMsgDistWeek

func (cube *DataCube) GetUpstreamMsgDistWeek(s string, e string) (resUpstreamMsgDistWeek ResUpstreamMsgDistWeek, err error)

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

func (*DataCube) GetUpstreamMsgHour

func (cube *DataCube) GetUpstreamMsgHour(s string, e string) (resUpstreamMsgHour ResUpstreamMsgHour, err error)

GetUpstreamMsgHour 获取消息分送分时数据

func (*DataCube) GetUpstreamMsgMonth

func (cube *DataCube) GetUpstreamMsgMonth(s string, e string) (resUpstreamMsgMonth ResUpstreamMsgMonth, err error)

GetUpstreamMsgMonth 获取消息发送月数据

func (*DataCube) GetUpstreamMsgWeek

func (cube *DataCube) GetUpstreamMsgWeek(s string, e string) (resUpstreamMsgWeek ResUpstreamMsgWeek, err error)

GetUpstreamMsgWeek 获取消息发送周数据

func (*DataCube) GetUserAccumulate

func (cube *DataCube) GetUserAccumulate(s string, e string) (resUserAccumulate ResUserAccumulate, err error)

GetUserAccumulate 获取累计用户数据

func (*DataCube) GetUserRead

func (cube *DataCube) GetUserRead(s string, e string) (resUserRead ResUserRead, err error)

GetUserRead 获取图文统计数据

func (*DataCube) GetUserReadHour

func (cube *DataCube) GetUserReadHour(s string, e string) (resUserReadHour ResUserReadHour, err error)

GetUserReadHour 获取图文统计分时数据

func (*DataCube) GetUserShare

func (cube *DataCube) GetUserShare(s string, e string) (resUserShare ResUserShare, err error)

GetUserShare 获取图文分享转发数据

func (*DataCube) GetUserShareHour

func (cube *DataCube) GetUserShareHour(s string, e string) (resUserShareHour ResUserShareHour, err error)

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

func (*DataCube) GetUserSummary

func (cube *DataCube) GetUserSummary(s string, e string) (resUserSummary ResUserSummary, err error)

GetUserSummary 获取用户增减数据

type ParamsPublisher

type ParamsPublisher struct {
	Action    string `json:"action"`
	StartDate string `json:"start_date"`
	EndDate   string `json:"end_date"`
	Page      int    `json:"page"`
	PageSize  int    `json:"page_size"`
	AdSlot    AdSlot `json:"ad_slot"`
}

ParamsPublisher 拉取数据参数

type ResAdPosList

type ResAdPosList struct {
	SlotID        int64   `json:"slot_id"`
	AdSlot        string  `json:"ad_slot"`
	Date          string  `json:"date"`
	ReqSuccCount  int     `json:"req_succ_count"`
	ExposureCount int     `json:"exposure_count"`
	ExposureRate  float64 `json:"exposure_rate"`
	ClickCount    int     `json:"click_count"`
	ClickRate     float64 `json:"click_rate"`
	Income        int     `json:"income"`
	Ecpm          float64 `json:"ecpm"`
}

ResAdPosList 公众号分广告位列表

type ResAdPosSummary

type ResAdPosSummary struct {
	ReqSuccCount  int     `json:"req_succ_count"`
	ExposureCount int     `json:"exposure_count"`
	ExposureRate  float64 `json:"exposure_rate"`
	ClickCount    int     `json:"click_count"`
	ClickRate     float64 `json:"click_rate"`
	Income        int     `json:"income"`
	Ecpm          float64 `json:"ecpm"`
}

ResAdPosSummary 公众号分广告位概览

type ResArticleSummary

type ResArticleSummary struct {
	util.CommonError

	List []struct {
		RefDate          string `json:"ref_date"`
		MsgID            string `json:"msgid"`
		Title            string `json:"title"`
		IntPageReadUser  int    `json:"int_page_read_user"`
		IntPageReadCount int    `json:"int_page_read_count"`
		OriPageReadUser  int    `json:"ori_page_read_user"`
		OriPageReadCount int    `json:"ori_page_read_count"`
		ShareUser        int    `json:"share_user"`
		ShareCount       int    `json:"share_count"`
		AddToFavUser     int    `json:"add_to_fav_user"`
		AddToFavCount    int    `json:"add_to_fav_count"`
	} `json:"list"`
}

ResArticleSummary 获取图文群发每日数据响应

type ResArticleTotal

type ResArticleTotal struct {
	util.CommonError

	List []struct {
		RefDate string                `json:"ref_date"`
		MsgID   string                `json:"msgid"`
		Title   string                `json:"title"`
		Details []ArticleTotalDetails `json:"details"`
	} `json:"list"`
}

ResArticleTotal 获取图文群发总数据响应

type ResCpsList

type ResCpsList struct {
	Date            string  `json:"date"`
	ExposureCount   int     `json:"exposure_count"`
	ClickCount      int     `json:"click_count"`
	ClickRate       float64 `json:"click_rate"`
	OrderCount      int     `json:"order_count"`
	OrderRate       float64 `json:"order_rate"`
	TotalFee        int     `json:"total_fee"`
	TotalCommission int     `json:"total_commission"`
}

ResCpsList 公众号返佣商品列表

type ResCpsSummary

type ResCpsSummary struct {
	ExposureCount   int     `json:"exposure_count"`
	ClickCount      int     `json:"click_count"`
	ClickRate       float64 `json:"click_rate"`
	OrderCount      int     `json:"order_count"`
	OrderRate       float64 `json:"order_rate"`
	TotalFee        int     `json:"total_fee"`
	TotalCommission int     `json:"total_commission"`
}

ResCpsSummary 公众号返佣概览

type ResInterfaceSummary

type ResInterfaceSummary struct {
	util.CommonError

	List []struct {
		RefDate       string `json:"ref_date"`
		CallbackCount int    `json:"callback_count"`
		FailCount     int    `json:"fail_count"`
		TotalTimeCost int    `json:"total_time_cost"`
		MaxTimeCost   int    `json:"max_time_cost"`
	} `json:"list"`
}

ResInterfaceSummary 接口分析数据响应

type ResInterfaceSummaryHour

type ResInterfaceSummaryHour struct {
	util.CommonError

	List []struct {
		RefDate       string `json:"ref_date"`
		RefHour       int    `json:"ref_hour"`
		CallbackCount int    `json:"callback_count"`
		FailCount     int    `json:"fail_count"`
		TotalTimeCost int    `json:"total_time_cost"`
		MaxTimeCost   int    `json:"max_time_cost"`
	} `json:"list"`
}

ResInterfaceSummaryHour 接口分析分时数据响应

type ResPublisherAdPos

type ResPublisherAdPos struct {
	util.CommonError

	BaseResp BaseResp        `json:"base_resp"`
	List     []ResAdPosList  `json:"list"`
	Summary  ResAdPosSummary `json:"summary"`
	TotalNum int             `json:"total_num"`
}

ResPublisherAdPos 公众号分广告位数据响应

type ResPublisherCps

type ResPublisherCps struct {
	util.CommonError

	BaseResp BaseResp      `json:"base_resp"`
	List     []ResCpsList  `json:"list"`
	Summary  ResCpsSummary `json:"summary"`
	TotalNum int           `json:"total_num"`
}

ResPublisherCps 公众号返佣商品数据响应

type ResPublisherSettlement

type ResPublisherSettlement struct {
	util.CommonError

	BaseResp          BaseResp         `json:"base_resp"`
	Body              string           `json:"body"`
	PenaltyAll        int              `json:"penalty_all"`
	RevenueAll        int64            `json:"revenue_all"`
	SettledRevenueAll int64            `json:"settled_revenue_all"`
	SettlementList    []SettlementList `json:"settlement_list"`
	TotalNum          int              `json:"total_num"`
}

ResPublisherSettlement 公众号结算收入数据及结算主体信息响应

type ResUpstreamMsg

type ResUpstreamMsg struct {
	util.CommonError

	List []struct {
		RefDate  string `json:"ref_date"`
		MsgType  int    `json:"msg_type"`
		MsgUser  int    `json:"msg_user"`
		MsgCount int    `json:"msg_count"`
	} `json:"list"`
}

ResUpstreamMsg 获取消息发送概况数据响应

type ResUpstreamMsgDist

type ResUpstreamMsgDist struct {
	util.CommonError

	List []struct {
		RefDate       string `json:"ref_date"`
		CountInterval int    `json:"count_interval"`
		MsgUser       int    `json:"msg_user"`
	} `json:"list"`
}

ResUpstreamMsgDist 获取消息发送分布数据响应

type ResUpstreamMsgDistMonth

type ResUpstreamMsgDistMonth struct {
	util.CommonError

	List []struct {
		RefDate       string `json:"ref_date"`
		CountInterval int    `json:"count_interval"`
		MsgUser       int    `json:"msg_user"`
	} `json:"list"`
}

ResUpstreamMsgDistMonth 获取消息发送分布月数据响应

type ResUpstreamMsgDistWeek

type ResUpstreamMsgDistWeek struct {
	util.CommonError

	List []struct {
		RefDate       string `json:"ref_date"`
		CountInterval int    `json:"count_interval"`
		MsgUser       int    `json:"msg_user"`
	} `json:"list"`
}

ResUpstreamMsgDistWeek 获取消息发送分布周数据响应

type ResUpstreamMsgHour

type ResUpstreamMsgHour struct {
	util.CommonError

	List []struct {
		RefDate  string `json:"ref_date"`
		RefHour  int    `json:"ref_hour"`
		MsgType  int    `json:"msg_type"`
		MsgUser  int    `json:"msg_user"`
		MsgCount int    `json:"msg_count"`
	} `json:"list"`
}

ResUpstreamMsgHour 获取消息分送分时数据响应

type ResUpstreamMsgMonth

type ResUpstreamMsgMonth struct {
	util.CommonError

	List []struct {
		RefDate  string `json:"ref_date"`
		MsgType  int    `json:"msg_type"`
		MsgUser  int    `json:"msg_user"`
		MsgCount int    `json:"msg_count"`
	} `json:"list"`
}

ResUpstreamMsgMonth 获取消息发送月数据响应

type ResUpstreamMsgWeek

type ResUpstreamMsgWeek struct {
	util.CommonError

	List []struct {
		RefDate  string `json:"ref_date"`
		MsgType  int    `json:"msg_type"`
		MsgUser  int    `json:"msg_user"`
		MsgCount int    `json:"msg_count"`
	} `json:"list"`
}

ResUpstreamMsgWeek 获取消息发送周数据响应

type ResUserAccumulate

type ResUserAccumulate struct {
	util.CommonError

	List []struct {
		RefDate      string `json:"ref_date"`
		CumulateUser int    `json:"cumulate_user"`
	} `json:"list"`
}

ResUserAccumulate 获取累计用户数据响应

type ResUserRead

type ResUserRead struct {
	util.CommonError

	List []struct {
		RefDate          string `json:"ref_date"`
		UserSource       int    `json:"user_source"`
		IntPageReadUser  int    `json:"int_page_read_user"`
		IntPageReadCount int    `json:"int_page_read_count"`
		OriPageReadUser  int    `json:"ori_page_read_user"`
		OriPageReadCount int    `json:"ori_page_read_count"`
		ShareUser        int    `json:"share_user"`
		ShareCount       int    `json:"share_count"`
		AddToFavUser     int    `json:"add_to_fav_user"`
		AddToFavCount    int    `json:"add_to_fav_count"`
	} `json:"list"`
}

ResUserRead 获取图文统计数据响应

type ResUserReadHour

type ResUserReadHour struct {
	util.CommonError

	List []struct {
		RefDate          string `json:"ref_date"`
		RefHour          int    `json:"ref_hour"`
		UserSource       int    `json:"user_source"`
		IntPageReadUser  int    `json:"int_page_read_user"`
		IntPageReadCount int    `json:"int_page_read_count"`
		OriPageReadUser  int    `json:"ori_page_read_user"`
		OriPageReadCount int    `json:"ori_page_read_count"`
		ShareUser        int    `json:"share_user"`
		ShareCount       int    `json:"share_count"`
		AddToFavUser     int    `json:"add_to_fav_user"`
		AddToFavCount    int    `json:"add_to_fav_count"`
	} `json:"list"`
}

ResUserReadHour 获取图文统计分时数据

type ResUserShare

type ResUserShare struct {
	util.CommonError

	List []struct {
		RefDate    string `json:"ref_date"`
		ShareScene int    `json:"share_scene"`
		ShareCount int    `json:"share_count"`
		ShareUser  int    `json:"share_user"`
	} `json:"list"`
}

ResUserShare 获取图文分享转发数据

type ResUserShareHour

type ResUserShareHour struct {
	util.CommonError

	List []struct {
		RefDate    string `json:"ref_date"`
		RefHour    int    `json:"ref_hour"`
		ShareScene int    `json:"share_scene"`
		ShareCount int    `json:"share_count"`
		ShareUser  int    `json:"share_user"`
	} `json:"list"`
}

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

type ResUserSummary

type ResUserSummary struct {
	util.CommonError

	List []struct {
		RefDate    string `json:"ref_date"`
		UserSource int    `json:"user_source"`
		NewUser    int    `json:"new_user"`
		CancelUser int    `json:"cancel_user"`
	} `json:"list"`
}

ResUserSummary 获取用户增减数据响应

type SettlementList

type SettlementList struct {
	Date           string        `json:"date"`
	Zone           string        `json:"zone"`
	Month          string        `json:"month"`
	Order          int           `json:"order"`
	SettStatus     int           `json:"sett_status"`
	SettledRevenue int           `json:"settled_revenue"`
	SettNo         string        `json:"sett_no"`
	MailSendCnt    string        `json:"mail_send_cnt"`
	SlotRevenue    []SlotRevenue `json:"slot_revenue"`
}

SettlementList 结算单列表

type SlotRevenue

type SlotRevenue struct {
	SlotID             string `json:"slot_id"`
	SlotSettledRevenue int    `json:"slot_settled_revenue"`
}

SlotRevenue 产生收入的广告

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL