Skip to content

Commit

Permalink
add type of cta text, edit test case for cta text
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetfaruk59 committed Sep 6, 2023
1 parent 9a8d833 commit 0407477
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions adapters/huaweiads/huaweiads.go
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,9 @@ func (a *adapter) extractAdmNative(adType int32, content *content, bidType openr
dataObject.Label = "desc"
dataObject.Value = getDecodeValue(content.MetaData.Description)
}

if asset.Data.Type == native1.DataAssetTypeCTAText {
dataObject.Type = native1.DataAssetTypeCTAText
dataObject.Value = getDecodeValue(content.MetaData.Cta)
}
responseAsset.Data = &dataObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"id": "test-imp-id",
"native": {
"request": "{\"context\":2,\"contextsubtype\":20,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"aurlsupport\":0,\"durlsupport\":0,\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"privacy\":0,\"assets\":[{\"id\":100,\"title\":{\"len\":90},\"required\":1},{\"id\":103,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200},\"required\":1},{\"id\":105,\"data\":{\"type\":2,\"len\":90},\"required\":1}],\"ver\":\"1.2\"}",
"request": "{\"context\":2,\"contextsubtype\":20,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"aurlsupport\":0,\"durlsupport\":0,\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"privacy\":0,\"assets\":[{\"id\":101,\"title\":{\"len\":90},\"required\":1},{\"id\":102,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200},\"required\":1},{\"id\":103,\"data\":{\"type\":2,\"len\":90},\"required\":1},{\"id\":105,\"data\":{\"type\":12,\"len\":90}}],\"ver\":\"1.2\"}",
"ver": "1.2"
},
"ext": {
Expand Down Expand Up @@ -164,7 +164,7 @@
"appId": "101219405",
"appPromotionChannel": "401721412",
"clickUrl": "https://ads.huawei.com/usermgtportal/home/index.html#/",
"cta": "%e5%ae%89%e8%a3%85",
"cta": "install",
"duration": 6038,
"description": "",
"icon": [
Expand Down Expand Up @@ -299,7 +299,7 @@
"huaweiads"
],
"crid": "58022259",
"adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":100,\"title\":{\"text\":\"/test/\",\"len\":6}},{\"id\":103,\"img\":{\"type\":3,\"url\":\"http://image.jpg\",\"w\":720,\"h\":1280}},{\"id\":105,\"data\":{\"label\":\"desc\",\"value\":\"\"}}],\"link\":{\"url\":\"https://ads.huawei.com/usermgtportal/home/index.html#/\",\"clicktrackers\":[\"http://test/click\"]},\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"http://test/imp\"}]}",
"adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":101,\"title\":{\"text\":\"/test/\",\"len\":6}},{\"id\":102,\"img\":{\"type\":3,\"url\":\"http://image.jpg\",\"w\":720,\"h\":1280}},{\"id\":103,\"data\":{\"label\":\"desc\",\"value\":\"\"}},{\"id\":105,\"data\":{\"type\":12,\"value\":\"install\"}}],\"link\":{\"url\":\"https://ads.huawei.com/usermgtportal/home/index.html#/\",\"clicktrackers\":[\"http://test/click\"]},\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"http://test/imp\"}]}",
"id": "test-imp-id",
"impid": "test-imp-id",
"price": 2.8,
Expand Down

0 comments on commit 0407477

Please sign in to comment.