AtTask 修饰符 [英] AtTask Modifiers

查看:39
本文介绍了AtTask 修饰符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 AtTask 修饰符的使用有几个问题.我一直在创建一个使用 API 来拉取和推送数据的应用程序,到目前为止一切顺利——文档非常好,服务的一致性也非常出色.

I have a few questions on the use of AtTask modifiers. I've been creating an application to pull and push data using the API, and it's been going really well so far -- the documentation is very good and the consistency of the service has been outstanding.

我遇到了一些我想问的事情——其中一些可能是有意的设计选择或限制,但如果不是,修复它们将导致 API 调用大幅减少(这是一个双赢).

I have come up against a few things I wanted to ask about -- it may be that some of these were intentional design choices or limitations, but if not, getting them fixed would lead to drastically fewer API calls (which is a win on both sides).

  1. 你能在相关"项目上使用修饰符吗?换句话说,如果我查询 API 数小时,我可以在 project:ID 或 project:DECustomFields 上使用 _Mod 吗?到目前为止,似乎对这两个问题的答案是否定的.我可以用 Mods 查询他们两个的项目并得到我期望的结果,但是当我从几个小时开始做时,我没有得到它.

  1. Can you use modifiers on "related" items? In other words, if I am querying the API for hours, can I use a _Mod on project:ID or project:DECustomFields? So far, it seems like the answer to both of those is no. I can query project for both of them with Mods and get the results I expect, but when I do it from hours, I don't get it.

我创建了一个修改器来搜索特定时间窗口内的所有小时,遵循之间"模式的 API 文档,如下所示:

I created a modifier to search for all hours within a certain window of time, following the API documentation for a "between" mod, like this:

entryDate=$$TODAY&entryDate_Range=$$TODAY-7d&entryDate_Mod=between...

entryDate=$$TODAY&entryDate_Range=$$TODAY-7d&entryDate_Mod=between...

但它没有正常工作——我必须切换 entryDate 和 _Range 值才能获得结果,如下所示:

but it didn't work properly -- I had to switch the entryDate and _Range values to get the results, like this:

&entryDate=$$TODAY-25d&entryDate_Range=$$TODAY&entryDate_Mod=between

&entryDate=$$TODAY-25d&entryDate_Range=$$TODAY&entryDate_Mod=between

是我做错了什么还是http://developers.attask.com/api上的文档-docs/ 向后?

Am I doing something wrong or is the documentation on http://developers.attask.com/api-docs/ backwards?

我可能会有更多问题.我上周刚刚开始开发这个应用程序,几乎所有的数据移动都成功运行——只需要弄清楚其中的一些细节,就能继续前进.:)

I will likely have more questions. I just started work on this app last week and have nearly all of the data movement working successfully -- just need to figure out a few of these details and will be able to move forward. :)

预先感谢您的帮助!

推荐答案

我很高兴您喜欢使用 AtTask API,也很高兴文档对您有所帮助.至于你的问题:

I am glad you are enjoying working with the AtTask API and I am happy the documentation is helping. As for your questions:

1) 您应该能够将 _Mod 添加到任何相关字段.对于下面的示例,我正在使用小时搜索中的 project:name,并且只返回在项目名称中包含Test"的项目中输入的小时条目.API 版本对于此功能应该无关紧要,但如果可能,我建议使用最新版本.

1) You should be able to add a _Mod to any related field. For the below example I am using project:name from an hour search and only returning hour entries entered on a project which have "Test" in the project name. API Version should not matter for this functionality but if possible I would recommend using the latest version.

/attask/api/v4.0/hour/search?project:name=Test&project:name_Mod=contains

2) 你说得对,文档是倒退的,我们很快就会在网站上修复这个问题.无论是处理日期还是数字,_Range 值都需要是两者中较高的一个.感谢您让我们知道.

2) You are absolutely right and the documentation is backwards, we will fix this on the site shortly. The _Range value needs to be the higher of the two whether dealing with dates or numbers. Thanks for letting us know.

/attask/api/v4.0/hour/search?entryDate=$$TODAY-25d&entryDate_Range=$$TODAY&entryDate_Mod=between

您提供的上述示例是使用 between mod 的正确方法.

The example above, which you provided, would be the correct way to use the between mod.

祝您的项目好运,如果您有任何其他问题或发现 上的文档有任何其他问题http://developers.attask.com/api-docs/ 请告诉我们.

Good luck with your project and if you have any other questions or notice anything else amiss with the documentation on http://developers.attask.com/api-docs/ please let us know.

这篇关于AtTask 修饰符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆