AtTask修饰符 [英] AtTask Modifiers

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

问题描述

我对使用AtTask修饰符的几个问题。我一直在创建一个应用程序来拉,并使用API​​推送数据,而且一直很顺利,到目前为止 - 文档是很不错的,服务的一致性一直悬而未决

我碰到了一些事情,我想请教一下 - 它可能是其中的一些是故意设计选择或限制,但如果没有,他们得到固定,会导致大幅度减少API调用(这是一个赢得两侧)。


  1. 你能使用的相关物品修饰语?换句话说,如果我查询了几个小时的API,可我用项目_mod:ID或项目:DECustomFields?到目前为止,好像回答这两个的是否定的。我可以查询项目对他们俩的合并MODS得到我期望的结果,但是当我从几个小时做的,我不明白这一点。


  2. 我创建了一个修饰符一定的时间窗口内搜索所有小时,一个API文档以下mod之间,像这样的:

    entryDate = $$现今放大器; entryDate_Range = $$ TODAY-7D和放大器; entryDate_Mod = ...之间

    但它并不能正常工作 - 我不得不切换entryDate和_Range值,以获得满意的结果,像这样的:

    &安培; entryDate = TODAY $$-25D和放大器; entryDate_Range = $$现今放大器; entryDate_Mod =之间


我是不是做错了什么或者是在 http://developers.attask.com/api文档-docs / 倒退?

我将可能有更多的问题。我只是在这个程序上周开始工作,并拥有几乎所有的数据移动的成功合作 - 只需要弄清楚几个这些详细信息,就能够向前推进。 :)

在此先感谢您的帮助!


解决方案

我很高兴你正在享受与AtTask API工作,我很高兴的文档正在帮助。至于你的问题:

1)你应该能够一个_mod添加到任何相关领域。对于下面的例子中,我使用的项目:名字来自一个小时的搜索,只返回小时条目上有测试项目名称项目进入。 API版本不应该的问题这个功能,但如果可能的话,我会建议使用最新版本。

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

2)你是绝对正确和文档是倒退,我们会尽快解决这个问题在网站上。该_Range值必须是两者的较高是否处理日期或数字。感谢您让我们知道了。

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

上面的例子,你提供的,是使用英国mod之间的正确途径。

祝你好运与您的项目,如果您有任何疑问或发现任何与文档其他不对劲http://developers.attask.com/api-docs/ 请让我们知道。

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.

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. 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.

  2. 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...

    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

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. :)

Thanks in advance for the help!

解决方案

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

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) 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

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

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天全站免登陆