0

我正在从 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.'

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

4

1 回答 1

0

请注意,api 将在以下情况下更新行项目:

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

- 并非所有行都会更新

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

于 2016-06-02T10:45:55.290 回答