Documentation ¶
Index ¶
- type GetRealTimeDataRequest
- type GetRealTimeDataResponse
- type GetReportFeedFileUrlRequest
- type GetReportFeedFileUrlResponse
- type GetReportFeedIdRequest
- type GetReportFeedIdResponse
- type GetReportFeedStateRequest
- type GetReportFeedStateResponse
- type RealTimeRequest
- type RealTimeResult
- type ReportRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRealTimeDataRequest ¶
type GetRealTimeDataRequest struct {
RealTimeRequestType *RealTimeRequest `json:"realTimeRequestType"`
}
GetRealTimeDataRequest 实时报告请求 API Request
func (GetRealTimeDataRequest) Url ¶
func (r GetRealTimeDataRequest) Url() string
type GetRealTimeDataResponse ¶
type GetRealTimeDataResponse struct {
Data []RealTimeResult `json:"data,omitempty"`
}
GetRealTimeDataResponse 实时报告请求 API Response
type GetReportFeedFileUrlRequest ¶
type GetReportFeedFileUrlRequest struct { // ReportId 报告ID ReportId string `json:"reportId,omitempty"` }
GetReportFeedFileUrlRequest 获取异步报告文件url API Request
func (GetReportFeedFileUrlRequest) Url ¶
func (r GetReportFeedFileUrlRequest) Url() string
type GetReportFeedFileUrlResponse ¶
type GetReportFeedFileUrlResponse struct { Data []struct { // ReportFilePath 报告问价下载地址,生成的url有效期为1小时,如果超时则需重新获取新的url。 ReportFilePath string `json:"reportFilePath,omitempty"` } `json:"data,omitempty"` }
GetReportFeedFileUrlResponse 获取异步报告文件url API Response
type GetReportFeedIdRequest ¶
type GetReportFeedIdRequest struct { // ReportRequestType 报告查询条件 ReportRequestType *ReportRequest `json:"reportRequestType,omitempty"` }
GetReportFeedIdRequest 创建异步报告(获取异步报告id)
func (GetReportFeedIdRequest) Url ¶
func (r GetReportFeedIdRequest) Url() string
type GetReportFeedIdResponse ¶
type GetReportFeedIdResponse struct { Data struct { // ReportId 异步报告ID。比如:8e7e3f2d84a19c5df1415957434b2bd8; 可用此ID调用查询异步报告状态和文件URL。 ReportId string `json:"reportId,omitempty"` } `json:"data,omitempty"` }
GetReportFeedIdResponse 创建异步报告(获取异步报告id) API Response
type GetReportFeedStateRequest ¶
type GetReportFeedStateRequest struct { // ReportId 报告ID ReportId string `json:"reportId,omitempty"` }
GetReportFeedStateRequest 获取异步报告状态 API Request
func (GetReportFeedStateRequest) Url ¶
func (r GetReportFeedStateRequest) Url() string
type GetReportFeedStateResponse ¶
type GetReportFeedStateResponse struct { Data []struct { // IsGenerated 报告生成状态; 1 - 等待中; 2 - 处理中; 3 - 处理成功 IsGenerated int `json:"isGenerated,omitempty"` } `json:"data,omitempty"` }
GetReportFeedStateResponse 获取异步报告状态
type RealTimeRequest ¶
type RealTimeRequest struct { // PerformanceData 必填 取值范围:cost(花费)、cpc(平均点击价格)、impression(展现)、click(点击)、ctr(点击率)、cpm(千次展现成本)、position(上方位平均排名)、conversion(网页转化)、商桥转化(bridgeConversion) 其中(impression,click必填) .另由于转化字段较多,取值可参考转化字段表。针对不同的物料层级,其合法的取值范围不同,(按照第一个请求的字段排序)请参见报告规则 PerformanceData []string `json:"performanceData,omitempty"` // Order 是否为降序排列; 选填,默认null,按照时间排序: true:降序 false:升序 app下载报告/推广电话报告,不支持排序 Order *bool `json:"order,omitempty"` // StartDate 统计开始时间,格式参考: 2010-08-01 StartDate string `json:"startDate,omitempty"` // EndDate 统计结束时间,格式参考: 2010-08-17 EndDate string `json:"endDate,omitempty"` // LevelOfDetails 指定返回的数据层级; LevelOfDetails int `json:"levelOfDetails,omitempty"` // ReportType 实时数据类型; ReportType int `json:"reportType,omitempty"` // StatIds 统计范围下的id集合。根据StatRange的不同类型填写不同id;选填,默认NULL,表示统计范围为全账户;staRange为3时填写计划id;staRange为5时填写单元id;staRange为7时填写创意id StatIds []int64 `json:"statIds,omitempty"` // StatRange 统计范围; StatRange int `json:"statRange,omitempty"` // UnitOfTime 统计时间单位; UnitOfTime int `json:"unitOfTime,omitempty"` // Number 返回数据条数;选填 目前实时报告中账户、计划、单元、关键词、创意报告最大支持10000,其他类型实时报告只支持5000。 默认值1000 注意:超过限制或者小于等于0则报错 说明:app下载报告/推广电话报告、当物料量较大时,建议按计划或单元分批获取,一条对应三条返回值 Number int `json:"number,omitempty"` // Producttype 版位; 0-全部; 1-列表页; 2-详情页 Producttype int `json:"producttype,omitempty"` // Subject 推广对象 Subject int `json:"subject,omitempty"` // BidType 出价模式 BidType []string `json:"bidType,omitempty"` // PayMode 付费模式 PayMode []string `json:"payMode,omitempty"` // MaterialStyle 样式类型 MaterialStyle int `json:"materialStyle,omitempty"` // Bstype bstype; Bstype int `json:"bstype,omitempty"` // PageIndex 分页; 选填)请求页码 说明:默认不分页 当不填写页码或页码参数为<=0时,代表未分页; 请求页码设置大于0时,代表分页请求(同时需要配合number字段) PageIndex int `json:"pageIndex,omitempty"` }
RealTimeRequest 实时报告请求-包含多类报告 LevelOfDetails 类型 2:账户粒度 3:计划粒度 5:单元粒度 7:创意粒度
ReportType 类型 700:账户报告 701:计划报告 702:单元报告 703:创意报告 706:地域报告 754:小程序报告 730:意图词报告 725:ocpx报告 757:媒体ID报告(媒体ID报告目前有权限限制,仅限开通媒体ID定向的账户使用) 705:程序化创意组合报告 711:性别年龄学历报告 717:平台网络报告 756:商圈报告 718:场所报告 747:APP分类报告 748:APP名称报告 751:人生阶段报告 745:文章类型报告 2371731:自动扩量报告
StatRange 可选值 选填,默认值为2 2:账户范围: 3:计划范围 5:单元范围 7:创意范围 注意:统计范围不能细于当前的统计粒度,例如统计粒度为计划,则统计范围不能细到单元
UnitOfTime 可选值 选填,默认值为5 取值范围: 5:分日 4:分周 3:分月 7:分时 8:请求时间段汇总(endDate-StartDate)
Subject 可选值 选填,默认值为0 0:全部 1:网站链接 2:应用下载(IOS) 3:应用下载(ANDROID) 注意:账户报告不支持此字段
BidType 可选值 ocpx才有用 ["3"]:ocpx ["5"]:ecpc ["3","5"]:ocpx+ecpc
PayMode 可选值 ocpx才有用 ["0","1"]:ocpc ["2"]:ocpm ["0","1","2"]:ocpx
MaterialStyle 可选值 选填,默认值为0 0:全部 1:单图 2:三图 3:大图 4:视频 5:橱窗 6:开屏 7:横幅 注意:仅创意报告支持此字段
bstyle 可选值 选填(不填返回全部) 0:全部 1:普通报告 3:闪投报告 7:原生RTA
type RealTimeResult ¶
type RealTimeResult struct { // ID 请求对象的ID(ocpx报告、媒体ID报告,地域报告此字段无用,固定为0) ID json.Number `json:"ID,omitempty"` // Name 请求对象的name,数组形式,不同报告形式的不同定义规则见下文“name字段规则” Name []string `json:"name,omitempty"` // Date 统计开始时间 Date string `json:"date,omitempty"` // KPIs 按照请求顺序,返回KPI数据数组 KPIs []json.Number `json:"KPIs,omitempty"` // RelatedIDsList 账户id,计划id,单元id RelatedIdsList []int64 `json:"relatedIdsList,omitempty"` // RelateIDsList 账户id,计划id,单元id RelateIdsList []json.Number `json:"relateIdsList,omitempty"` // TotalRowNumber 记录总条数 TotalRowNumber json.Number `json:"totalRowNumber,omitempty"` // PageIndex 当前页码 PageIndex json.Number `json:"pageindex,omitempty"` }
RealTimeResult 实时报告
type ReportRequest ¶
type ReportRequest struct { // PerformanceData 必填 取值范围:cost(花费)、cpc(平均点击价格)、impression(展现)、click(点击)、ctr(点击率)、cpm(千次展现成本)、position(上方位平均排名)、conversion(网页转化)、商桥转化(bridgeConversion) 其中(impression,click必填) .另由于转化字段较多,取值可参考转化字段表。针对不同的物料层级,其合法的取值范围不同,(按照第一个请求的字段排序)请参见报告规则 PerformanceData []string `json:"performanceData,omitempty"` // IdOnly 是否只需要id IdOnly *bool `json:"idOnly,omitempty"` // StartDate 统计开始时间,格式参考: 2010-08-01 StartDate string `json:"startDate,omitempty"` // EndDate 统计结束时间,格式参考: 2010-08-17 EndDate string `json:"endDate,omitempty"` // LevelOfDetails 指定返回的数据层级; LevelOfDetails int `json:"levelOfDetails,omitempty"` // Format 报告文件格式 Format int `json:"format,omitempty"` // ReportType 实时数据类型; ReportType int `json:"reportType,omitempty"` // StatIds 统计范围下的id集合。根据StatRange的不同类型填写不同id;选填,默认NULL,表示统计范围为全账户;staRange为3时填写计划id;staRange为5时填写单元id;staRange为7时填写创意id StatIds []int64 `json:"statIds,omitempty"` // StatRange 统计范围; StatRange int `json:"statRange,omitempty"` // UnitOfTime 统计时间单位; UnitOfTime int `json:"unitOfTime,omitempty"` // Producttype 版位; 0-全部; 1-列表页; 2-详情页 Producttype int `json:"producttype,omitempty"` // Subject 推广对象 Subject int `json:"subject,omitempty"` // BidType 出价模式 BidType []string `json:"bidType,omitempty"` // PayMode 付费模式 PayMode []string `json:"payMode,omitempty"` // MaterialStyle 样式类型 MaterialStyle int `json:"materialStyle,omitempty"` Bstype int `json:"bstype,omitempty"` // Bstype bstype; }
ReportRequest 实时报告请求-包含多类报告 LevelOfDetails 类型 2:账户粒度 3:计划粒度 5:单元粒度 7:创意粒度
ReportType 类型 700:账户报告 701:计划报告 702:单元报告 703:创意报告 706:地域报告 754:小程序报告 730:意图词报告 725:ocpx报告 757:媒体ID报告(媒体ID报告目前有权限限制,仅限开通媒体ID定向的账户使用) 705:程序化创意组合报告 711:性别年龄学历报告 717:平台网络报告 756:商圈报告 718:场所报告 747:APP分类报告 748:APP名称报告 751:人生阶段报告 745:文章类型报告 2371731:自动扩量报告
StatRange 可选值 选填,默认值为2 2:账户范围: 3:计划范围 5:单元范围 7:创意范围 注意:统计范围不能细于当前的统计粒度,例如统计粒度为计划,则统计范围不能细到单元
UnitOfTime 可选值 选填,默认值为5 取值范围: 5:分日 4:分周 3:分月 7:分时 8:请求时间段汇总(endDate-StartDate)
Subject 可选值 选填,默认值为0 0:全部 1:网站链接 2:应用下载(IOS) 3:应用下载(ANDROID) 注意:账户报告不支持此字段
BidType 可选值 ocpx才有用 ["3"]:ocpx ["5"]:ecpc ["3","5"]:ocpx+ecpc
PayMode 可选值 ocpx才有用 ["0","1"]:ocpc ["2"]:ocpm ["0","1","2"]:ocpx
MaterialStyle 可选值 选填,默认值为0 0:全部 1:单图 2:三图 3:大图 4:视频 5:橱窗 6:开屏 7:横幅 注意:仅创意报告支持此字段
bstyle 可选值 选填(不填返回全部) 0:全部 1:普通报告 3:闪投报告 7:原生RTA