Trello 可以发送哪些可能的网络钩子类型?每个都有什么属性? [英] What are the possible kinds of webhooks Trello can send? What attributes come in each?

查看:27
本文介绍了Trello 可以发送哪些可能的网络钩子类型?每个都有什么属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个与 Trello 紧密集成的应用程序,并将 Trello 网络钩子用于很多事情.但是,我在 Trello 的开发人员文档中找不到任何可能触发 webhook 的操作",以及每个操作中会出现哪些数据.

I'm developing an app that is tightly integrated with Trello and uses Trello webhooks for a lot of things. However, I can't find anywhere in Trello's developer documentation what are the "actions" that may trigger a webhook and what data will come in each of these.

事实上,根据我的经验,每个 webhook 附带的数据有点随机.例如,虽然大多数 webhook 包含 cardshortLink,它是某些操作的目标,但有些则不包含,以完全不可预测的方式.此外,从清单创建卡片似乎不会触发正常创建卡片时触发的 Webhook,等等.

In fact, in my experience, the data that comes with each webhook is kinda random. For example, while most webhooks contain the shortLink of the card which is being the target of some action, some do not, in a totally unpredictable way. Also, creating cards from checklists doesn't seem to trigger the same webhook that is triggered when a card is created normally, and so on.

那么,这是否记录在某处?

So, is that documented somewhere?

推荐答案

在解决了这些问题以及我对每个 webhook 中应该包含哪些数据以及每个不同操作的名称的原始记忆后,我决定自己记录下来并将其作为一组 JSON 文件(随着我发现新的 webhook 不断更新)发布,其中显示了每个 webhook 将发送到您的端点的数据样本:

After fighting against these issues and my raw memory of what data should come in each webhook, along with the name of each different action, I decided to document this myself and released it as a (constantly updating as I find new webhooks out there) set of JSON files showing samples of the data each webhook will send to your endpoint:

https://github.com/fiatjaf/trello-webhooks

例如,当一个板子被关闭时,一个 webhook 将被发送

For example, when a board is closed, a webhook will be sent with

{
  "id": "55d7232fc3597726f3e13ddf",
  "idMemberCreator": "50e853a3a98492ed05002257",
  "data": {
    "old": {
      "closed": false
    },
    "board": {
      "shortLink": "V50D5SXr",
      "id": "55af0b659f5c12edf972ac2e",
      "closed": true,
      "name": "Communal Website"
    }
  },
  "type": "updateBoard",
  "date": "2015-08-21T13:10:07.216Z",
  "memberCreator": {
    "username": "fiatjaf",
    "fullName": "fiatjaf",
    "avatarHash": "d2f9f8c8995019e2d3fda00f45d939b8",
    "id": "50e853a3a98492ed05002257",
    "initials": "F"
  }
}

事实上,来的是一个 JSON 对象,比如 {"model": ..., "action": ... 你在上面看到的数据...},但我'为了简洁起见,我删除了这些,我只展示了action"键里面的内容.

In fact, what comes is a JSON object like {"model": ..., "action": ... the data you see up there...}, but I've removed these for the sake o brevity and I'm showing only what comes inside the "action" key.

这篇关于Trello 可以发送哪些可能的网络钩子类型?每个都有什么属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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