Skip to content

Commit 78d0b4c

Browse files
committed
Merge branch 'release/v1.33.7'
2 parents 272e315 + f5d35ad commit 78d0b4c

90 files changed

Lines changed: 2878 additions & 689 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
module github.com/bububa/oceanengine
22

3-
go 1.21
3+
go 1.23.0
44

55
require (
6-
github.com/google/go-cmp v0.6.0
7-
go.opentelemetry.io/otel v1.29.0
8-
go.opentelemetry.io/otel/metric v1.29.0
9-
go.opentelemetry.io/otel/trace v1.29.0
10-
google.golang.org/protobuf v1.34.2
6+
github.com/google/go-cmp v0.7.0
7+
go.opentelemetry.io/otel v1.36.0
8+
go.opentelemetry.io/otel/metric v1.36.0
9+
go.opentelemetry.io/otel/trace v1.36.0
10+
google.golang.org/protobuf v1.36.6
1111
)
1212

1313
require (
1414
github.com/go-logr/logr v1.4.2 // indirect
1515
github.com/go-logr/stdr v1.2.2 // indirect
16+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
1617
)

go.sum

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,21 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
55
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
66
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
77
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
8-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
9-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
8+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
9+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
1010
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1111
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
12-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
13-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
14-
go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw=
15-
go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8=
16-
go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc=
17-
go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8=
18-
go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4=
19-
go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ=
20-
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
21-
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
12+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
13+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
14+
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
15+
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
16+
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
17+
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
18+
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
19+
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
20+
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
21+
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
22+
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
23+
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
2224
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2325
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

marketing-api/OCEANENGINE.md

Lines changed: 491 additions & 481 deletions
Large diffs are not rendered by default.

marketing-api/QIANCHUAN.md

Lines changed: 147 additions & 142 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package dpa
2+
3+
import (
4+
"context"
5+
6+
"github.com/bububa/oceanengine/marketing-api/core"
7+
"github.com/bububa/oceanengine/marketing-api/model/dpa"
8+
)
9+
10+
// AlbumCreate 上传短剧剧目
11+
// 特别注意:
12+
// 创建短剧为异步动作,提交创建任务→上传短剧完成耗时较长,创建完后返回的album_id未必处于正常状态,建议您定时轮询「查询短剧可投状态」,获取短剧创建结果和短剧是否可投
13+
// 请求本接口时需要使用APP Access Token,通过【获取APP Access Token】接口获取,同时传入token对应的app_id请求
14+
func AlbumCreate(ctx context.Context, clt *core.SDKClient, accessToken string, req *dpa.AlbumCreateRequest) (string, error) {
15+
var resp dpa.AlbumCreateResponse
16+
if err := clt.PostAPI(ctx, "v3.0/dpa/album/create/", req, &resp, accessToken); err != nil {
17+
return "", err
18+
}
19+
return resp.Data.AlbumID, nil
20+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package dpa
2+
3+
import (
4+
"context"
5+
6+
"github.com/bububa/oceanengine/marketing-api/core"
7+
"github.com/bububa/oceanengine/marketing-api/model/dpa"
8+
)
9+
10+
// AlbumStatusGet 查询短剧可投状态
11+
// 通过短剧alblumID查询短剧可投状态
12+
// 特别注意:请求本接口时需要使用APP Access Token,通过【获取APP Access Token】接口获取
13+
func AlbumStatusGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *dpa.AlbumStatusGetRequest) (*dpa.AlbumStatusGetResult, error) {
14+
var resp dpa.AlbumStatusGetResponse
15+
if err := clt.GetAPI(ctx, "v3.0/dpa/album_status/get/", req, &resp, accessToken); err != nil {
16+
return nil, err
17+
}
18+
return resp.Data, nil
19+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package file
2+
3+
import (
4+
"context"
5+
6+
"github.com/bububa/oceanengine/marketing-api/core"
7+
"github.com/bububa/oceanengine/marketing-api/model/file"
8+
)
9+
10+
// PlayableCreate 上传试玩/直玩素材
11+
func PlayableCreate(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.PlayableCreateRequest) (*file.PlayableMaterial, error) {
12+
var resp file.PlayableCreateResponse
13+
if err := clt.PostAPI(ctx, "v3.0/file/playable/create/", req, &resp, accessToken); err != nil {
14+
return nil, err
15+
}
16+
return resp.Data, nil
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package file
2+
3+
import (
4+
"context"
5+
6+
"github.com/bububa/oceanengine/marketing-api/core"
7+
"github.com/bububa/oceanengine/marketing-api/model/file"
8+
)
9+
10+
// PlayableList 获取试玩/直玩素材
11+
func PlayableList(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.PlayableListRequest) (*file.PlayableListResult, error) {
12+
var resp file.PlayableListResponse
13+
if err := clt.GetAPI(ctx, "v3.0/file/playable/list/", req, &resp, accessToken); err != nil {
14+
return nil, err
15+
}
16+
return resp.Data, nil
17+
}

marketing-api/api/file/video_effeciency_get.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"github.com/bububa/oceanengine/marketing-api/model/file"
88
)
99

10-
// VideoEffeciencyGet 获取低效素材
10+
// VideoEfficiencyGet 获取低效素材
1111
// 支持查询素材是否是低效素材,传入素材ID列表,返回低效素材列表。
12-
func VideoEffeciencyGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoEffeciencyGetRequest) ([]string, error) {
13-
var resp file.VideoEffeciencyGetResponse
14-
if err := clt.Get(ctx, "2/file/video/effeciency/get/", req, &resp, accessToken); err != nil {
12+
func VideoEfficiencyGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoEfficiencyGetRequest) ([]string, error) {
13+
var resp file.VideoEfficiencyGetResponse
14+
if err := clt.GetAPI(ctx, "2/file/video/efficiency/get/", req, &resp, accessToken); err != nil {
1515
return nil, err
1616
}
1717
return resp.Data.IDs, nil

marketing-api/api/qianchuan/file/video_effeciency_get.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/bububa/oceanengine/marketing-api/model/qianchuan/file"
88
)
99

10-
// VideoEffeciencyGet 获取低效素材
10+
// VideoEfficiencyGet 获取低效素材
1111
// 支持查询素材是否是低效素材,传入素材ID列表,返回低效素材列表。
1212
// 1.什么是低效素材?
1313
// 在一定历史投放周期内,素材累积消耗低于系统标准,即定义为低效素材。
@@ -17,10 +17,10 @@ import (
1717
// 如计划下出现大量低效素材,则该计划预计跑量困难,占用在投计划配额、投放人力和投放预算,建议更换素材。
1818
// 3. 如依然使用低效素材会产生哪些问题?
1919
// 如果新建创意下素材全部为低效素材,那么创意将无法创建成功,建议更换其他素材。创建广告创意相关接口的拦截功能将于2023年1月初上线。请务必提前关注【获取低效素材】接口,进行低效素材识别和管理。
20-
func VideoEffeciencyGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoEffeciencyGetRequest) ([]string, error) {
21-
var resp file.VideoEffeciencyGetResponse
22-
if err := clt.Get(ctx, "v1.0/qianchuan/file/video/effeciency/get/", req, &resp, accessToken); err != nil {
20+
func VideoEfficiencyGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoEfficiencyGetRequest) ([]string, error) {
21+
var resp file.VideoEfficiencyGetResponse
22+
if err := clt.GetAPI(ctx, "v1.0/qianchuan/file/video/efficiency/get/", req, &resp, accessToken); err != nil {
2323
return nil, err
2424
}
25-
return resp.Data.InEffecientMaterialIDs, nil
25+
return resp.Data.InefficientMaterialIDs, nil
2626
}

0 commit comments

Comments
 (0)