back channeling
v0.3.0

返回频道是一种实时BBS工具。
它具有以下功能:
启动数据组传输。
% bin/transactor
开始后退频道。
% DATOMIC_URL=datomic:free://localhost:4334/bc bin/back_channeling
默认端口为3009。
或者
% git clone https://github.com/kawasima/back-channeling.git
% cd back-channeling
% heroku create
% git push heroku master
只需3分钟!
注册时,选择一种类型的机器人帐户。您必须记住授权代码。
首先,您可以通过授权代码获得令牌。
POST /api/token
code=[authorization code]
您将得到以下答复:
{"access_token": , "name": "bot", "email": "[email protected]"}
当您要求回到网络API时,必须将令牌添加到HTTP标头。
curl -H 'Accept: application/json' -H 'Authorization: Token xxxxxxxxxxxxxxxx' [API url]
如果您发送了邮政请求,请将Content-Type添加到请求标题中。
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Token xxxxxxxxxxxxxxxx' [API url]
获取董事会数据。
GET /api/board/:board-name
响应的一个示例如下:
{
"id":17592186045424,
"name":"default",
"description":"Default board",
"threads":[
{"id":17592186045428,
"title":"aaa",
"since":"20150722T101724.515Z",
"last-updated":"20150722T110108.015Z",
"resnum":1000,"watchers":[]},
{"id":17592186045651,"title":"hohoho",
"since":"20150722T104559.129Z",
"last-updated":"20150929T123754.988Z",
"watchers":["bot2"],"resnum":1000}
]
}
GET /api/thread/:thread-id
POST /api/board/:board-name/threads
{"thread/name": "New thread", "comment/content": "Hello"}
POST /api/thread/:thread-id/comments
{"comment/content": "Hello"}