-
Notifications
You must be signed in to change notification settings - Fork 750
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
Huaweiads: Remove empty image assets from response #3308
Conversation
Code coverage summaryNote:
huaweiadsRefer here for heat map coverage report
|
Code coverage summaryNote:
huaweiadsRefer here for heat map coverage report
|
if len(content.MetaData.ImageInfo) == imgIndex && asset.Img.Type == native1.ImageAssetTypeMain { | ||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahmetfaruk59 could you help to explain how this change bind the number of main image objects from huaweiads instead of all main image objects in the request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @onkarvhanumante. Previously all assets for main image type in the request were included in the response. Now only the main images returned from the huaweiads service are returned as a response. in the mentioned condition block, imgIndex is for making sure that all returned ads from huaweiads are binded to response and the type of the asset is main image type3. after all image assets from the service is binded then "continue" for other image main assets in the request
Previous:
request: "{assets:[
{required:0,title:{len:90}},
{required:0,img:{type:1,w:20,wmin:20,h:20,hmin:20}},
{required:0,img:{type:3,w:300,wmin:300,h:250,hmin:250}},
{required:0,img:{type:3,w:640,wmin:640,h:360,hmin:360}},
{required:0,img:{type:3,w:1312,wmin:1080,h:607,hmin:768}},
...
...
]}
response
assets:[
{id:0,title:{text:"Jewel Blast Legend",len:18}},
{id:2,img:{type:1,url:"image1.png",w:20,h:20}},
{id:2,img:{type:3,url:"image2.png",w:1080,h:607}},
{id:3,img:{type:3,url: " " ,w:300,h:250}},
{id:4,img:{type:3,url: " " ,w:320,h:250}},
{id:5,img:{type:3,url: "" ,w:1312,h:768}},
.
.
.
]
bind the number of main image objects from huaweiads instead of all main image objects in the request