0
我從DBM下載訂單項,修改它們並將它們再次上傳到DBM。一旦上傳,如果我再次下載並查看它們,我無法看到這些修改。代碼中沒有錯誤,API也沒有返回任何errorStatus
。DoubleClick Bid Manager API不更新訂單項
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.'
這是檢查線路項是否被修改,還是我做錯事的正確方法?有沒有其他方法可以檢查它?