2024-04-26 03:26:39 发布
网友
我是python新手,希望有一个python脚本,可以根据下面的图片更新Toggl。请注意,我不想启动/停止计时器(虽然如果您想在中通过,我可以使用它),但我真正想做的只是在事实发生后添加时间。在
我只想说:
我尝试了togglwrapper(https://pypi.python.org/pypi/togglwrapper/1.0.1)并通过API令牌连接到我的帐户。我只是不知道如何发送添加时间条目的请求。在
TogglWrapper没有创建时间条目的选项,就像在以下端点中指定的那样:
https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md#create-a-time-entry
但你也可以这样启动和停止计时器: 在数据中一定要包括正确的数据。在
>>> from togglwrapper import Toggl >>> toggl = Toggl('your_api_token') >>> data = {"time_entry":{"description":"description","tags":["billed"],"pid":123,"created_with":"curl"}} >>> response = toggl.TimeEntries.start()
它将调用此API端点:https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md#start-a-time-entry
现在获取时间条目ID来停止它。在
希望有帮助!在
TogglWrapper没有创建时间条目的选项,就像在以下端点中指定的那样:
https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md#create-a-time-entry
但你也可以这样启动和停止计时器: 在数据中一定要包括正确的数据。在
它将调用此API端点:https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md#start-a-time-entry
现在获取时间条目ID来停止它。在
^{pr2}$希望有帮助!在
相关问题 更多 >
编程相关推荐