英文:
How can I use Language Constant in google ads python?
问题
我有一个从Google广告API中提供关键词建议的代码。
在这段代码中,我有一个选择语言并使用语言ID的部分,但在Google Ads API的新版本(V13)中,它已被弃用并移除。
language_rn = client.get_service(
"LanguageConstantService"
).language_constant_path(language_id)
现在LanguageConstantService的替代方法是什么?
如何在我的请求中设置语言?
我在以下链接找到了我的代码:
https://www.danielherediamejias.com/python-keyword-planner-google-ads-api/
错误信息是:
ValueError: 指定的服务LanguageConstantService在Google Ads API v13中不存在。
英文:
I have a code that give me suggestion of keywords from google ads api.
in this code I have a section that select language with language id but in new version of Google Ads API (V13) it's deprecated and removed.
language_rn = client.get_service(
"LanguageConstantService"
).language_constant_path(language_id)
What is the alternative of LanguageConstantService Now?
How can I set Language in my request?
I find my code from link below:
https://www.danielherediamejias.com/python-keyword-planner-google-ads-api/
The Error is:
> ValueError: Specified service LanguageConstantService does not exist
> in Google Ads API v13.
答案1
得分: 2
我发现我们可以使用GoogleAdsService来实现:
language_rn = client.get_service("GoogleAdsService").language_constant_path(
language_id
)
查看这个链接:
https://developers.google.com/google-ads/api/samples/generate-keyword-ideas
英文:
I found out we can use GoogleAdsService for it:
language_rn = client.get_service("GoogleAdsService").language_constant_path(
language_id
)
check this out:
https://developers.google.com/google-ads/api/samples/generate-keyword-ideas
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论