Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取账户下资产列表(新)接口有bug #70

Closed
594872799 opened this issue Aug 21, 2024 · 1 comment
Closed

获取账户下资产列表(新)接口有bug #70

594872799 opened this issue Aug 21, 2024 · 1 comment

Comments

@594872799
Copy link

594872799 commented Aug 21, 2024

SDK版本:github.com/bububa/oceanengine v1.26.4
image
在调用巨量接口获取账户下资产列表(新)https://open.oceanengine.com/labels/34/docs/1800985709803914 的时候发现

// AllAssetsList 获取账户下资产列表(新)
// - 本接口为巨量引擎开放平台2024年6月5日新增接口,接口能力覆盖旧接口「获取已创建资产列表」,且新增支持以下能力:
//   - 支持获取橙子落地页TETRIS_EXTERNAL、应用APP资产类型信息
//   - 可通过资产ID、资产类型以及资产修改时间筛选查询广告主拥有的资产信息
//
// - 「获取已创建资产列表」接口即将于8月6日下线,可切换至本接口获取资产信息
// - 应答参数返回的资产范围如下:
//   - 包含账户下创建的资产以及被共享的资产,返回结果与巨量广告平台事件资产列表&详情信息一致
//   - 账户下不返回已删除的资产
func AllAssetsList(clt *core.SDKClient, accessToken string, req *eventmanager.AllAssetsListRequest) (*eventmanager.AllAssetsListResult, error) {
	var resp eventmanager.AllAssetsListResponse
	if err := clt.Get("2/tools/event/all_assets/list/", req, &resp, accessToken); err != nil {
		return nil, err
	}
	return resp.Data, nil
}

这里面的Get方法在拼接url的时候会用BASE_URL

BASE_URL = "https://ad.oceanengine.com/open_api/"

而官方文档上的url为:https://api.oceanengine.com/open_api/2/tools/event/all_assets/list/ ,因此会导致调用的时候返回错误404

bububa added a commit that referenced this issue Aug 21, 2024
@bububa bububa closed this as completed Aug 21, 2024
@594872799
Copy link
Author

@bububa 还有问题
image
输出为
{"code":0,"message":"OK","request_id":"xxx","data":{"asset_list":[{"asset_id":xxxxxx,"asset_name":"xxx","asset_type":"xxx","create_time":"xxxxx","modify_time":"xxxx","share_type":"xxx"}],"page_info":{"page":1,"page_size":30,"total_number":1,"total_page":1}}}
他的response为
image
但是在代码里面,为list,导致获取不到值
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants