DoubleClick Bid Manager API 未更新订单项
DoubleClick Bid Manager API not updating the line items
我正在从 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.'
这是检查行项目是否被修改的正确方法,还是我做错了什么?有没有其他方法可以查看?
请注意,api 将在以下情况下更新订单项:
-基于任何标志,如果为该行设置了标志,它将更新
-并非所有行都会得到更新
参考这个link:https://developers.google.com/bid-manager/guides/entity-write/format-对于writeable值为yes的那些Column只能更新
我正在从 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.'
这是检查行项目是否被修改的正确方法,还是我做错了什么?有没有其他方法可以查看?
请注意,api 将在以下情况下更新订单项:
-基于任何标志,如果为该行设置了标志,它将更新
-并非所有行都会得到更新
参考这个link:https://developers.google.com/bid-manager/guides/entity-write/format-对于writeable值为yes的那些Column只能更新