Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

わかるらんどAPI #49

Open
masui opened this issue Jun 21, 2016 · 2 comments
Open

わかるらんどAPI #49

masui opened this issue Jun 21, 2016 · 2 comments

Comments

@masui
Copy link
Collaborator

masui commented Jun 21, 2016

自動で画像を投稿できるようにするするAPIが欲しい

@napo0703
Copy link
Owner

napo0703 commented Jul 6, 2016

投稿だけならこれしかやってないです。
こういうのをライブラリとかAPI化とかするにはどうするのがいいんでしょうか?

const server_url = "YOUR_LINDA_SERVER";
const socket = SocketIO(server_url);
const linda = new Linda().connect(socket);
const ts = linda.tuplespace("YOUR_TUPLE_SPACE");

linda.io.on("connect", () => {
  console.log("connect Linda!!");
}

var sendReaction = (reactor, img_url, display_time) => {
  ts.write({from: reactor, value: img_url, time: display_time});
};

@shokai
Copy link
Collaborator

shokai commented Jul 6, 2016

tuple仕様だけREADMEに書いておけばいいのでは
あとは、CLIから node wakaruland-post.js http:~~~ のようにして引数に渡した画像URLをpostするサンプルコードをリポジトリに入れておく、ぐらいで十分だと思います

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants