GetAdsByAdGroupId不返回Ad数组,只返回Text对象(Python SDK) [英] GetAdsByAdGroupId does not return Ad array but only a Text object (Python SDK)
问题描述
我一直在关注此示例:https://github.com/BingAds/BingAds-Python-SDK/blob/master/examples/BingAdsPythonConsoleExamples/BingAdsPythonConsoleExamples/v11/keywords_ads.py#L365
但是当我尝试使用下面的代码片段检索广告时,我只返回一个Text对象,而不是我可以迭代的Ad对象数组:
I've been following this example: https://github.com/BingAds/BingAds-Python-SDK/blob/master/examples/BingAdsPythonConsoleExamples/BingAdsPythonConsoleExamples/v11/keywords_ads.py#L365
But when I try to retrieve ads with the following code snippet below, I only get a Text object back and not an array of Ad objects I can iterate over:
result_proxy = campaign_mgmt_service.GetAdsByAdGroupId(AdGroupId=adgroup_id, AdTypes=auth_helper.ALL_AD_TYPES)
我正在使用API的v11,我引用的方法就是这个:https://msdn.microsoft.com/en-us/library/bing-ads-campaign-management-getadsbyadgroupid .aspx
I am using v11 of the API, and the method that I am referencing is this one: https://msdn.microsoft.com/en-us/library/bing-ads-campaign-management-getadsbyadgroupid.aspx
推荐答案
似乎这是Python SDK在没有结果时的默认响应。请随意关闭它,但我建议将来可能会返回一个空数组或None,以便更清楚地说明发生了什么。
Seems like this is the default response by the Python SDK when there are no results at all. Feel free to close this, but I suggest that perhaps an empty array or None be returned in the future to make it more clear what is happening.
这篇关于GetAdsByAdGroupId不返回Ad数组,只返回Text对象(Python SDK)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!