Pyxero发票过滤器不起作用

时间:2015-04-14 19:13:23

标签: python api get

我正在使用Pyxero下载一些发票,但以下代码会从日期时间之前提取发票:

import Xero
ckey = 'xxxxxxxxxxxxxxxxxxxxxxx'
#link to private RSA key
with open('privatekey.pem') as keyfile:
    rsa_key = keyfile.read()

credentials = PrivateCredentials(ckey, rsa_key)
xero = Xero(credentials)

invoices = xero.invoices.filter(since=datetime.datetime(2015,4,1))

是否有人在get请求中成功使用了Pyxero发票过滤器?我们公司的发票太多,并且没有过滤器的get请求导致Segmentation Fault

由于

1 个答案:

答案 0 :(得分:0)

该过滤器返回自指定日期以来最后修改的所有发票(它使用If-Modified-Since HTTP标头)。我已经测试了你的代码并且它对我有用,所以也许你可能会在错误的日期字段上进行过滤?

相关问题