如何订阅PubSubHubbub github?

时间:2013-05-08 18:21:37

标签: ruby github pubsubhubbub

我目前正在尝试编写一个侦听来自(enterprise)github的事件的基本客户端,并相应地进行API调用。

我遇到的问题是我无法设置PubSubHubbub客户端。我认为这是我正在使用的客户端/身份验证,但我现在无法从the docs工作获得基本呼叫!

为了弄清楚我做错了什么,我正在向我的普通github帐户发出一个卷曲请求:

curl -u "joepym" -i \
 https://api.github.com/hub \
 -F "hub.mode=subscribe" \
 -F "hub.topic=http://github.com/JoePym/faraday/events/push" \
 -F "hub.callback=*callbackurl*"

我要回来了

HTTP/1.1 100 Continue

HTTP/1.1 422 Unprocessable Entity
Server: GitHub.com
Date: Wed, 08 May 2013 18:13:24 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Status: 422 Unprocessable Entity
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4989
X-GitHub-Media-Type: github.beta
X-Content-Type-Options: nosniff
Content-Length: 38

{
  "message": "Invalid event: nil"
}

当我尝试使用企业凭证调用我的企业github帐户时,我的主要客户端也会收到此无效事件消息。

有没有人遇到过这个?

1 个答案:

答案 0 :(得分:1)

尝试使用https://github.com/JoePym/faraday/events/push作为hub.topic。请注意,我们现在使用的是“https”。