back channeling
v0.3.0

La canalisation arrière est un outil BBS en temps réel.
Il a les fonctionnalités comme suit:
Démarrez un transacteur datomique.
% bin/transactor
Démarrez une canalisation arrière.
% DATOMIC_URL=datomic:free://localhost:4334/bc bin/back_channeling
Le port par défaut est 3009.
ou
% git clone https://github.com/kawasima/back-channeling.git
% cd back-channeling
% heroku create
% git push heroku master
Cela ne prend que 3 minutes !!
Lorsque vous vous inscrivez, sélectionnez un type de compte BOT. Vous devez vous souvenir du code d'autorisation.
Tout d'abord, vous obtenez un jeton par code d'autorisation.
POST /api/token
code=[authorization code]
Vous obtiendrez une réponse comme suit:
{"access_token": , "name": "bot", "email": "[email protected]"}
Vous devez ajouter le jeton aux en-têtes HTTP lorsque vous demandez à BackChanniling Web API.
curl -H 'Accept: application/json' -H 'Authorization: Token xxxxxxxxxxxxxxxx' [API url]
Et si vous envoyez une demande de message, ajoutez Content-Type à l'en-tête de demande.
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Token xxxxxxxxxxxxxxxx' [API url]
Obtenez des données de carte.
GET /api/board/:board-name
Un exemple de réponse comme suit:
{
"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"}