我正在为使用Clockify API()的用户请求一些时间条目。由于某些原因,我收到一些回复,其中包括没有结束时间的条目。我注意到,意外返回的条目属于当前运行的时间实体。。。但是,我没有指定/使用'in progress'参数。。。这是怎么回事?在
这是我的代码:
def fetch_users_time_entries(users):
API_URL = "https://api.clockify.me/api/v1"
for user in users:
url = "{}/workspaces/{}/user/{}/time-entries?hydrated=true&page-size=1000&start=2019-08-05T00:00:01Z".format(API_URL, WORKSPACE_ID, user['clockify_id'])
time_entries = requests.get(url, headers=HEADER)
for time_entry in time_entries.json():
以下是意外“结束”值的示例:
^{pr2}$我只希望时间条目完成。有什么建议吗?在
更新(10/16/19):
好吧,所以我终于有机会重现这个问题,看起来。。。时间没有尽头。它们误导性地提供了一个start和end参数,,但这两个参数都是在start time上过滤的。在
开始和结束参数的工作方式如下:
进行中的工作方式如doc中所述,但它不适用于您的应用程序。在
回答:
“最好用你的脚本把所有的元素都删除,然后用你的脚本把它们全部删除”。在
输出:
仅包含没有时间间隔。结束=='无'。在
以下是编辑此答案所花的时间:
相关问题 更多 >
编程相关推荐