【发布时间】:2018-07-16 08:25:45
【问题描述】:
只是想知道是否有人可以提供帮助。我尝试了不同的方法来使用 Python 在 Infusionsoft 中查询我的联系人,但无济于事。我已成功连接到服务器、添加联系人并修改字段,但我无法列出我的所有联系人及其 Phone1 和 Phone2 号码。关于下面的代码,有人能指出我正确的方向吗?我知道它需要一些调整!非常感谢您的帮助。
import xmlrpc.client
server =
xmlrpc.client.ServerProxy("https://xxxxx.infusionsoft.com:443/api/xmlrpc");
key = "xxxxxx";
print ("Welcome! You are now connected to: ", server);
table = 'Contact'
returnFields = ['Id', 'FirstName', 'Phone1', 'Phone2']
query = {'FirstName', 'Phone1', 'Phone2'}
limit = 10
page = 0
results = server.system('query', table, limit, page, query, returnFields)
for result in results:
print ('Found: '), result['FirstName','Phone1', 'Phone2'];
【问题讨论】:
标签: python-3.x xml-rpc infusionsoft