Trello API:在特定板上获取分配给用户的所有卡 [英] Trello API: Get all Cards assigned to a user, on a specific board

查看:102
本文介绍了Trello API:在特定板上获取分配给用户的所有卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将所有卡分配到特定用户的面板中,但以下内容将返回面板中的所有卡.

I'm trying to get all cards in a board assigned to a specific user, but the below returns all the cards in a board.

我在任何地方都找不到此解决方案;这是我尝试过的方法,它返回分配给所有用户的卡:

I did not find this solution anywhere; this is what I tried, and it returns cards assigned to all users:

https://api.trello.com/1/boards/${boardid}/cards?fields=name,shortLink&key=${applicationkey}&token=${userkey}

  • $ {boardid} =我要从中获取卡片的板的ID
  • $ {applicationkey} = Trello开发人员API密钥
  • $ {userkey} = Trello用户令牌
  • 看起来很多人都可以做到这一点,但是关于这一点没有可用的文档.

    Looks like a lot of people were able to do this, but there is no working documentation on this one.

    推荐答案

    通过使用Trello搜索API,我能够做到这一点(将所有卡分配给我).

    I was able to accomplish this (get all cards assigned to me), by using the Trello search API.

    查询URL(分配给成员的卡):

    https://api.trello.com/1/search ?query = label:green%20member :$ {memberid}%20board:$ {boardname}%20sort:edited& card_fields = name,shortLink& cards_limit = 100& key = $ {applicationkey}& token = $ {userkey}

    https://api.trello.com/1/search?query=label:green%20member:${memberid}%20board:${boardname}%20sort:edited&card_fields=name,shortLink&cards_limit=100&key=${applicationkey}&token=${userkey}

    查询模式(用于读卡的正则表达式):

    名称":({{描述}.+?)","shortLink":({Id}.+?)"

    "name":"({Description}.+?)","shortLink":"({Id}.+?)"

    使用的参数:

    • $ {applicationkey} =开发人员API密钥
    • $ {userkey} =用户令牌
    • $ {boardname} = Trello中的董事会的实际名称
    • $ {memberid} = Trello用户的成员ID

    获取开发人员API密钥和用户令牌: 点击此处

    从此处获取会员ID:

    https://api.trello.com/1/search ?query = is:open%20board :$ {boardname}%20sort:edited& card_fields =名称,shortLink,member& cards_limit = 100& key = APIKey& token = UserToken

    https://api.trello.com/1/search?query=is:open%20board:${boardname}%20sort:edited&card_fields=name,shortLink,member&cards_limit=100&key=APIKey&token=UserToken

    这篇关于Trello API:在特定板上获取分配给用户的所有卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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