简体   繁体   English

Podio api hook = false不起作用

[英]Podio api hook=false isn't working

I'm trying to set up a nodejs server to make some sync between Podio and Trello. 我正在尝试设置一个nodejs服务器,以在Podio和Trello之间进行一些同步。 My problem is that when I update Podio through their api, the webhook gets triggered even if I've request for the hook not to be triggered. 我的问题是,当我通过其api更新Podio时,即使我请求不触发该挂钩,也会触发webhook。

I'm using the module: node-podio-api 我正在使用以下模块: node-podio-api

example call, which causes an infinite loop: 示例调用,这会导致无限循环:

var authCode = result.auth;

var options = { auth: authCode,
                type: "item",
                id: podioId,
                hook: false,
                body:{value:comment}}

podio.commentsAddCommentToObject(options,function(err,result){
    if(err) throw err;
    console.log(util.inspect(result, { showHidden: true, depth: null }))
});

So it turns out that this API doesn't actually support the 'hook' value, which is why it failed. 因此,事实证明该API实际上并不支持'hook'值,这就是它失败的原因。 For reference, this is an old API wrapper library, which shouldn't be used. 作为参考,这是一个旧的API包装器库,不应使用。 Use the official one: https://github.com/podio/podio-js/ 使用官方的: https : //github.com/podio/podio-js/

To archive not make the webhook fire when updating an item, you just need to add the following to the url: "?hook=false" 要在更新项目时存档而不使webhook触发,只需将以下内容添加到url:“?hook = false”

Eg: 例如:

podio.request('get','/item/123456?hook=false)

won't fire the webhooks 不会触发网络挂钩

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM