Skip to content

Commit

Permalink
qianchuan(report): 获取直播大屏数据相关接口升级,历史接口将于2024.9.17号下线
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Aug 19, 2024
1 parent 01174bc commit aedf9d9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

// LongTransferOrderDataGet 获取长周期订单数据
func LongTransferOrderDataGet(clt *core.SDKClient, accessToken string, req *report.LongTransferOrderDataGetRequest) (*report.CustomGetResult, error) {
func LongTransferOrderDataGet(clt *core.SDKClient, accessToken string, req *report.CustomGetRequest) (*report.CustomGetResult, error) {
var resp report.CustomGetResponse
err := clt.Get("v1.0/qianchuan/report/long_transfer/order/data/get/", req, &resp, accessToken)
if err != nil {
Expand Down
16 changes: 16 additions & 0 deletions marketing-api/api/qianchuan/report/today_live_room_config_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package report

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/qianchuan/report"
)

// TodayLiveRoomConfigGet 获取直播大屏可用指标和维度
func TodayLiveRoomConfigGet(clt *core.SDKClient, accessToken string, req *report.CustomConfigGetRequest) (*report.CustomConfigGetResult, error) {
var resp report.CustomConfigGetResponse
err := clt.Get("v1.0/qianchuan/report/today_live/room/config/get/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/qianchuan/report/today_live_room_data_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package report

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/qianchuan/report"
)

// TodayLiveRoomDataGet 获取直播大屏数据
func TodayLiveRoomDataGet(clt *core.SDKClient, accessToken string, req *report.CustomGetRequest) (*report.CustomGetResult, error) {
var resp report.CustomGetResponse
err := clt.Get("v1.0/qianchuan/report/today_live/room/data/get/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
6 changes: 3 additions & 3 deletions marketing-api/model/qianchuan/report/custom_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ type CustomGetRequest struct {
StartTime string `json:"start_time,omitempty"`
// EndTime 结束时间。格式为:2022-08-01 23:59:59
EndTime string `json:"end_time,omitempty"`
// DataTopics 数据主题,可选值:
// DataTopic 数据主题,可选值:
// ECP_BASIC_DATA 千川平台广告基础数据
// SITE_PROMOTION_POST_DATA_LIVE 全域推广-素材-直播间画面
// SITE_PROMOTION_POST_DATA_VIDEO 全域推广-素材-视频
// SITE_PROMOTION_POST_DATA_OTHER 全域推广-素材-其他创意
// SITE_PROMOTION_POST_DATA_TITLE 全域推广-素材-标题
DataTopics []string `json:"data_topics,omitempty"`
DataTopic string `json:"data_topic,omitempty"`
// Dimensions 维度列表。
// 可通过【获取自定义报表可用维度和指标】接口获取不同数据主题下的可用维度和指标
Dimensions []string `json:"dimensions,omitempty"`
Expand Down Expand Up @@ -69,7 +69,7 @@ type CustomGetOrderBy struct {
func (r CustomGetRequest) Encode() string {
values := util.GetUrlValues()
values.Set("advertiser_id", strconv.FormatUint(r.AdvertiserID, 10))
values.Set("data_topics", string(util.JSONMarshal(r.DataTopics)))
values.Set("data_topic", r.DataTopic)
values.Set("dimensions", string(util.JSONMarshal(r.Dimensions)))
values.Set("metrics", string(util.JSONMarshal(r.Metrics)))
if len(r.Filters) > 0 {
Expand Down

This file was deleted.

0 comments on commit aedf9d9

Please sign in to comment.