feat:新增接口
This commit is contained in:
parent
c373f02e61
commit
dfa544784d
|
@ -116,3 +116,20 @@ func (ability *Defaultability) TaobaoTmcUserPermit(req *request.TaobaoTmcUserPer
|
|||
}
|
||||
return &respStruct, err
|
||||
}
|
||||
|
||||
/*
|
||||
UD工具-获取deeplink链接
|
||||
*/
|
||||
func (ability *Defaultability) TaobaoUnideskRtaToolsMonitorurlGet(req *request.TaobaoUnideskRtaToolsMonitorurlGetRequest) (*response.TaobaoUnideskRtaToolsMonitorurlGetResponse, error) {
|
||||
if ability.Client == nil {
|
||||
return nil, errors.New("Defaultability topClient is nil")
|
||||
}
|
||||
var jsonStr, err = ability.Client.Execute("taobao.unidesk.rta.tools.monitorurl.get", req.ToMap(), req.ToFileMap())
|
||||
var respStruct = response.TaobaoUnideskRtaToolsMonitorurlGetResponse{}
|
||||
if err != nil {
|
||||
log.Println("taobaoUnideskRtaToolsMonitorurlGet error", err)
|
||||
return &respStruct, err
|
||||
}
|
||||
err = util.HandleJsonResponse(jsonStr, &respStruct)
|
||||
return &respStruct, err
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package request
|
||||
|
||||
type TaobaoUnideskRtaToolsMonitorurlGetRequest struct {
|
||||
MonitorUrlTopQueryDto *MonitorUrlTopQueryDto `json:"monitor_url_top_query_dto" required:"true" `
|
||||
}
|
||||
|
||||
type MonitorUrlTopQueryDto struct {
|
||||
/*
|
||||
计划组ID */
|
||||
CampaignId *int64 `json:"campaign_id" required:"true" `
|
||||
/*
|
||||
落地页 */
|
||||
LandingPage *string `json:"landing_page" required:"true" `
|
||||
/*
|
||||
广告主ID */
|
||||
AdvertiserId *int64 `json:"advertiser_id" required:"true" `
|
||||
}
|
||||
|
||||
func (s *TaobaoUnideskRtaToolsMonitorurlGetRequest) setCampaignId(v int64) *TaobaoUnideskRtaToolsMonitorurlGetRequest {
|
||||
s.MonitorUrlTopQueryDto.CampaignId = &v
|
||||
return s
|
||||
}
|
||||
func (s *TaobaoUnideskRtaToolsMonitorurlGetRequest) setLandingPage(v string) *TaobaoUnideskRtaToolsMonitorurlGetRequest {
|
||||
s.MonitorUrlTopQueryDto.LandingPage = &v
|
||||
return s
|
||||
}
|
||||
func (s *TaobaoUnideskRtaToolsMonitorurlGetRequest) SetAdvertiserId(v int64) *TaobaoUnideskRtaToolsMonitorurlGetRequest {
|
||||
s.MonitorUrlTopQueryDto.AdvertiserId = &v
|
||||
return s
|
||||
}
|
||||
|
||||
func (req *TaobaoUnideskRtaToolsMonitorurlGetRequest) ToMap() map[string]interface{} {
|
||||
paramMap := make(map[string]interface{})
|
||||
if req.MonitorUrlTopQueryDto.CampaignId != nil {
|
||||
paramMap["campaign_id"] = *req.MonitorUrlTopQueryDto.CampaignId
|
||||
}
|
||||
if req.MonitorUrlTopQueryDto.LandingPage != nil {
|
||||
paramMap["landing_page"] = *req.MonitorUrlTopQueryDto.LandingPage
|
||||
}
|
||||
if req.MonitorUrlTopQueryDto.AdvertiserId != nil {
|
||||
paramMap["advertiser_id"] = *req.MonitorUrlTopQueryDto.AdvertiserId
|
||||
}
|
||||
return paramMap
|
||||
}
|
||||
|
||||
func (req *TaobaoUnideskRtaToolsMonitorurlGetRequest) ToFileMap() map[string]interface{} {
|
||||
fileMap := make(map[string]interface{})
|
||||
return fileMap
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package response
|
||||
|
||||
type TaobaoUnideskRtaToolsMonitorurlGetResponse struct {
|
||||
|
||||
/*
|
||||
Result
|
||||
*/
|
||||
Result MonitorUrlTopDTO `json:"request_id"`
|
||||
}
|
||||
|
||||
type MonitorUrlTopDTO struct {
|
||||
DeeplinkUrl string `json:"deeplink_url"`
|
||||
ClickUrl string `json:"click_url"`
|
||||
}
|
Loading…
Reference in New Issue