如何通过API调用向Trello卡添加评论?

时间:2017-05-31 15:05:47

标签: python trello

我正在通过Postman测试Trello API,我在向卡添加评论时遇到问题。

我正在向https://api.trello.com/1/cards/card id/actions/commentCard/comments?&key=my_key&token=my_token&text=comment提交PUT请求,但收到错误:

  

idAction的值无效

有人可以指出我做错了吗?

3 个答案:

答案 0 :(得分:2)

根据Trello API,您需要POST /1/cards/[card id or shortlink]/actions/comments。请参阅Trello API

答案 1 :(得分:0)

您尝试POST到

var repository = new Repository(); var requestObject = RequestFactory.CreateRequest(""); var requestInteractions = new RequestInteractions(requestObject,repository); requestInteractions.ValidateAndSave();

必须在其中将变量https://api.trello.com/1/cards/cardID/actions/comments?text=yourComment&key=apiKey&token=trelloTokencardIyourCommentapiKey更改为变量

答案 2 :(得分:0)

为了插入评论,这些参数是必需的: 1: id //卡片ID 2: key // API 密钥 3:令牌 4: text // 你想要的评论

所以,如果你想使用 postman 来做,使用下面的 URL 并将方法设置为 POST

https://api.trello.com/1/cards/{id}/actions/comments? 
key=""&token=""&text=""

而不是 {id} --> 插入您的卡号

key="" ---> 然后插入你的私钥和令牌

text="" ---> 然后在 " "

中插入您的评论