Skip to content

Commit

Permalink
Merge branch 'release/v1.25.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Jul 18, 2024
2 parents 6f0208b + 8363fb3 commit 17471b1
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 0 deletions.
1 change: 1 addition & 0 deletions marketing-api/STAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
- 获取订单投后分析报表 [ ReportOrderOverviewGet(clt *core.SDKClient, accessToken string, req *star.ReportOrderOverviewGetRequest) (*star.ReportOrderOverviewGetResponseData, error) ]
- 获取订单投后受众报表 [ ReportOrderUserDistributionGet(clt *core.SDKClient, accessToken string, req *star.ReportOrderUserDistributionGetRequest) (*star.ReportOrderUserDistributionGetResponseData, error) ]
- 获取星图订单投后线索 [ ClueList(clt *core.SDKClient, accessToken string, req *star.ClueListRequest) (*star.ClueListResponseData, error) ]
- 获取星图账户信息 [ Info(clt *core.SDKClient, accessToken string, req *star.InfoRequest) ([]star.Info, error) ]
16 changes: 16 additions & 0 deletions marketing-api/api/star/info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package star

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

// Info 获取星图账户信息
// 获取星图账户全量信息
func Info(clt *core.SDKClient, accessToken string, req *star.InfoRequest) ([]star.Info, error) {
var resp star.InfoResponse
if err := clt.Get("2/star/info/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data.InfoList, nil
}
21 changes: 21 additions & 0 deletions marketing-api/enum/star_info_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package enum

// StarInfoStatus 账户状态
type StarInfoStatus string

const (
// StarInfoStatus_DELETED 已删除
StarInfoStatus_DELETED StarInfoStatus = "DELETED"
// StarInfoStatus_ENABLE 有效
StarInfoStatus_ENABLE StarInfoStatus = "ENABLE"
// StarInfoStatus_FROZEN 禁用
StarInfoStatus_FROZEN StarInfoStatus = "FROZEN"
// StarInfoStatus_NEW_PROTOCOL 待同意新协议
StarInfoStatus_NEW_PROTOCOL StarInfoStatus = "NEW_PROTOCOL"
// StarInfoStatus_PUNISH 惩罚
StarInfoStatus_PUNISH StarInfoStatus = "PUNISH"
// StarInfoStatus_QUALIFICATION_VERIFICATION 资质验证
StarInfoStatus_QUALIFICATION_VERIFICATION StarInfoStatus = "QUALIFICATION_VERIFICATION"
// StarInfoStatus_UN_PROTOCOL 未同意协议
StarInfoStatus_UN_PROTOCOL StarInfoStatus = "UN_PROTOCOL"
)
68 changes: 68 additions & 0 deletions marketing-api/model/star/info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package star

import (
"github.com/bububa/oceanengine/marketing-api/enum"
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)

// InfoRequest 获取星图账户信息 API Request
type InfoRequest struct {
// StarIDs 星图id
StarIDs []uint64 `json:"star_ids,omitempty"`
}

// Encode implement GetRequest interface
func (r InfoRequest) Encode() string {
values := util.GetUrlValues()
values.Set("star_ids", string(util.JSONMarshal(r.StarIDs)))
ret := values.Encode()
util.PutUrlValues(values)
return ret
}

// InfoResponse 获取星图账户信息 API Response
type InfoResponse struct {
model.BaseResponse
Data struct {
// InfoList 信息列表
InfoList []Info `json:"info_list,omitempty"`
} `json:"data,omitempty"`
}

// Info 星图账户信息
type Info struct {
// StarID 星图id
StarID uint64 `json:"star_id,omitempty"`
// StarName 星图名称
StarName string `json:"star_name,omitempty"`
// Status 账户状态
// DELETED 已删除
// ENABLE 有效
// FROZEN 禁用
// NEW_PROTOCOL 待同意新协议
// PUNISH 惩罚
// QUALIFICATION_VERIFICATION 资质验证
// UN_PROTOCOL 未同意协议
Status enum.StarInfoStatus `json:"status,omitempty"`
// CompanyName 公司名称
CompanyName string `json:"company_name,omitempty"`
// CategoryID 行业分类id
CategoryID uint64 `json:"categorty_id,omitempty"`
// CompanyID 公司id
CompanyID uint64 `json:"company_id,omitempty"`
// FirstInfo 一级行业
FirstInfo *IndustryInfo `json:"first_info,omitempty"`
// SecondInfo 二级行业
SecondInfo *IndustryInfo `json:"second_info,omitempty"`
// CreateTime 创建时间
CreateTime int64 `json:"create_time,omitempty"`
}

// IndustryInfo 行业信息
type IndustryInfo struct {
// IndustryID 行业id
IndustryID uint64 `json:"industry_id,omitempty"`
// IndustryName 行业名称
IndustryName string `json:"industry_name,omitempty"`
}
7 changes: 7 additions & 0 deletions marketing-api/model/tools/comment/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ type Comment struct {
CommentPermission enum.CommentPermission `json:"comment_permission,omitempty"`
// MaterialID 评论关联的视频素材id
MaterialID uint64 `json:"material_id,omitempty"`
// CommentImages 评论图片内容,返回图片url列表
CommentImages []string `json:"comment_images,omitempty"`
// CommentType 评论内容类型
// IMAGE_COMMENT 图片评论
// IMAGE_TEXT_COMMENT 图文评论
// TEXT_COMMENT 文字评论
CommentType enum.CommentType `json:"comment_type,omitempty"`
}

// UserInfo 评论用户信息
Expand Down

0 comments on commit 17471b1

Please sign in to comment.