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"`
}
func (GetRealTimeDataRequest) Url ¶
func (r GetRealTimeDataRequest) Url() string
type GetRealTimeDataResponse ¶
type GetRealTimeDataResponse struct {
Data []RealTimeResult `json:"data,omitempty"`
}
type GetReportFeedFileUrlRequest ¶
type GetReportFeedFileUrlRequest struct {
ReportId string `json:"reportId,omitempty"`
}
func (GetReportFeedFileUrlRequest) Url ¶
func (r GetReportFeedFileUrlRequest) Url() string
type GetReportFeedFileUrlResponse ¶
type GetReportFeedFileUrlResponse struct { Data []struct { ReportFilePath string `json:"reportFilePath,omitempty"` // 报告问价下载地址,生成的url有效期为1小时,如果超时则需重新获取新的url。 } `json:"data,omitempty"` }
type GetReportFeedIdRequest ¶
type GetReportFeedIdRequest struct {
ReportRequestType *ReportRequest `json:"reportRequestType,omitempty"`
}
func (GetReportFeedIdRequest) Url ¶
func (r GetReportFeedIdRequest) Url() string
type GetReportFeedIdResponse ¶
type GetReportFeedIdResponse struct { Data struct { ReportId string `json:"reportId,omitempty"` } `json:"data,omitempty"` }
type GetReportFeedStateRequest ¶
type GetReportFeedStateRequest struct {
ReportId string `json:"reportId,omitempty"`
}
func (GetReportFeedStateRequest) Url ¶
func (r GetReportFeedStateRequest) Url() string
type GetReportFeedStateResponse ¶
type GetReportFeedStateResponse struct { Data []struct { IsGenerated int `json:"isGenerated,omitempty"` // 报告生成状态; 1 - 等待中; 2 - 处理中; 3 - 处理成功 } `json:"data,omitempty"` }
type RealTimeRequest ¶
type RealTimeRequest struct { PerformanceData []string `json:"performanceData,omitempty"` // 必填 取值范围:cost(花费)、cpc(平均点击价格)、impression(展现)、click(点击)、ctr(点击率)、cpm(千次展现成本)、position(上方位平均排名)、conversion(网页转化)、商桥转化(bridgeConversion) 其中(impression,click必填) .另由于转化字段较多,取值可参考转化字段表。针对不同的物料层级,其合法的取值范围不同,(按照第一个请求的字段排序)请参见报告规则 Order *bool `json:"order,omitempty"` // 是否为降序排列; 选填,默认null,按照时间排序: true:降序 false:升序 app下载报告/推广电话报告,不支持排序 StartDate string `json:"startDate,omitempty"` // 统计开始时间,格式参考: 2010-08-01 EndDate string `json:"endDate,omitempty"` // 统计结束时间,格式参考: 2010-08-17 LevelOfDetails int `json:"levelOfDetails,omitempty"` // 指定返回的数据层级; ReportType int `json:"reportType,omitempty"` // 实时数据类型; StatIds []int64 `json:"statIds,omitempty"` // 统计范围下的id集合。根据StatRange的不同类型填写不同id;选填,默认NULL,表示统计范围为全账户;staRange为3时填写计划id;staRange为5时填写单元id;staRange为7时填写创意id StatRange int `json:"statRange,omitempty"` // 统计范围; UnitOfTime int `json:"unitOfTime,omitempty"` // 统计时间单位; Number int `json:"number,omitempty"` // 返回数据条数;选填 目前实时报告中账户、计划、单元、关键词、创意报告最大支持10000,其他类型实时报告只支持5000。 默认值1000 注意:超过限制或者小于等于0则报错 说明:app下载报告/推广电话报告、当物料量较大时,建议按计划或单元分批获取,一条对应三条返回值 Producttype int `json:"producttype,omitempty"` // 版位; 0-全部; 1-列表页; 2-详情页 Subject int `json:"subject,omitempty"` // 推广对象 BidType []string `json:"bidType,omitempty"` // 出价模式 PayMode []string `json:"payMode,omitempty"` // 付费模式 MaterialStyle int `json:"materialStyle,omitempty"` // 样式类型 Bstype int `json:"bstype,omitempty"` // bstype; PageIndex int `json:"pageIndex,omitempty"` // 分页; 选填)请求页码 说明:默认不分页 当不填写页码或页码参数为<=0时,代表未分页; 请求页码设置大于0时,代表分页请求(同时需要配合number字段) }
实时报告请求-包含多类报告 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 json.Number `json:"ID,omitempty"` // 请求对象的ID(ocpx报告、媒体ID报告,地域报告此字段无用,固定为0) Name []string `json:"name,omitempty"` // 请求对象的name,数组形式,不同报告形式的不同定义规则见下文“name字段规则” Date string `json:"date,omitempty"` // 统计开始时间 KPIs []json.Number `json:"KPIs,omitempty"` // 按照请求顺序,返回KPI数据数组 RelatedIdsList []int64 `json:"relatedIdsList,omitempty"` // 账户id,计划id,单元id TotalRowNumber int64 `json:"totalRowNumber,omitempty"` // 记录总条数 PageIndex int `json:"pageindex,omitempty"` // 当前页码 }
type ReportRequest ¶
type ReportRequest struct { PerformanceData []string `json:"performanceData,omitempty"` // 必填 取值范围:cost(花费)、cpc(平均点击价格)、impression(展现)、click(点击)、ctr(点击率)、cpm(千次展现成本)、position(上方位平均排名)、conversion(网页转化)、商桥转化(bridgeConversion) 其中(impression,click必填) .另由于转化字段较多,取值可参考转化字段表。针对不同的物料层级,其合法的取值范围不同,(按照第一个请求的字段排序)请参见报告规则 IdOnly *bool `json:"idOnly,omitempty"` // 是否只需要id StartDate string `json:"startDate,omitempty"` // 统计开始时间,格式参考: 2010-08-01 EndDate string `json:"endDate,omitempty"` // 统计结束时间,格式参考: 2010-08-17 LevelOfDetails int `json:"levelOfDetails,omitempty"` // 指定返回的数据层级; Format int `json:"format,omitempty"` // 报告文件格式 ReportType int `json:"reportType,omitempty"` // 实时数据类型; StatIds []int64 `json:"statIds,omitempty"` // 统计范围下的id集合。根据StatRange的不同类型填写不同id;选填,默认NULL,表示统计范围为全账户;staRange为3时填写计划id;staRange为5时填写单元id;staRange为7时填写创意id StatRange int `json:"statRange,omitempty"` // 统计范围; UnitOfTime int `json:"unitOfTime,omitempty"` // 统计时间单位; Producttype int `json:"producttype,omitempty"` // 版位; 0-全部; 1-列表页; 2-详情页 Subject int `json:"subject,omitempty"` // 推广对象 BidType []string `json:"bidType,omitempty"` // 出价模式 PayMode []string `json:"payMode,omitempty"` // 付费模式 MaterialStyle int `json:"materialStyle,omitempty"` // 样式类型 Bstype int `json:"bstype,omitempty"` // bstype; }
实时报告请求-包含多类报告 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