【问题标题】:DoubleClick Bid Manager API not updating the line itemsDoubleClick Bid Manager API 未更新订单项
【发布时间】:2016-05-05 12:09:07
【问题描述】:

我正在从 DBM 下载订单项,对其进行修改并再次上传到 DBM。上传后,如果我再次下载并查看它们,我将无法看到修改。代码中没有错误,API 也没有返回任何errorStatus

上传订单项的代码:

service = build('doubleclickbidmanager', config.Version, http=credentials.authorize(httplib2.Http()))
request = service.lineitems().uploadlineitems(body=BODY)
response = request.execute()

if 'uploadStatus' in response and 'errors' in response['uploadStatus']:
    for error in response['uploadStatus']['errors']:
    logging.error(error)

下载订单项的代码:

service = build('doubleclickbidmanager', config.Version, http=credentials.authorize(httplib2.Http()))
request = service.lineitems().downloadlineitems(body=body)

print "Downloading Line Items.."
logging.info("function: Downloading Line Items..")

# Execute request and save response contents.
with open(file_path, 'wb') as handler:
    # Call the API, getting the (optionally filtered) list of line items.
    # Then write the contents of the response to a CSV file.
    lidata = request.execute()['lineItems'].encode('utf-8')
    logging.info("function:request.execute succeeded.")
    handler.write(lidata)
    print 'Download Completed.'

这是检查订单项是否被修改的正确方法,还是我做错了什么?有没有其他方法可以检查?

【问题讨论】:

    标签: python api google-api google-admin-sdk double-click-advertising


    【解决方案1】:

    请注意,api 会在以下情况下更新订单项:

    -基于任何标志,如果为行设置了标志,它将更新

    -并非所有行都会更新

    参考这个链接:https://developers.google.com/bid-manager/guides/entity-write/format-对于那些可写值为yes的Columns只能更新

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 1970-01-01
      • 2016-07-25
      相关资源
      最近更新 更多