BingAds / BingAds-Python-SDK

Other
118 stars 164 forks source link

Bulk API: SubType = None for ImageAsset #304

Closed VadimSaratov closed 1 week ago

VadimSaratov commented 1 week ago

When I download the CSV file with all Asset Group records

I have the Images column with the following data:

[{"id":7353154021222,"subType":"LandscapeImageMedia","cropX":0,"cropY":31,"cropWidth":830,"cropHeight":435},
{"id":7353154021343,"subType":"ImageMedia178X100","cropX":0,"cropY":0,"cropWidth":830,"cropHeight":466},
// ... More images
]

but when I print the entity I get the following:

(AssetLink){
   Asset =
          (ImageAsset){
             Id = 7353154021222
         Name = None
         Type = "ImageAsset"
         CropHeight = 435
         CropWidth = 830
         CropX = 0
         CropY = 31
         SubType = None
         TargetHeight = None
         TargetWidth = None
      }
   AssetPerformanceLabel = None
   EditorialStatus = None
   PinnedField = None
   TargetWidth = None
   TargetHeight = None
}

SubType seems to be missing in csv_to_field_ImageAssetLinks and field_to_csv_ImageAssetLinks in bingads/v13/internal/extensions.py

xinyuwen2 commented 1 week ago

Thank you! Fix is included in version 13.0.23.