Skip to content

Commit

Permalink
Twitter: added proper implementation of 'tweet' cmd.
Browse files Browse the repository at this point in the history
  • Loading branch information
akoprow committed Mar 28, 2012
1 parent 5bb0149 commit 1384246
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/twitter.opa
Expand Up @@ -94,7 +94,8 @@ Please re-run your application with: --twitter-config option")
private function tweet(state, content) {
match (state) {
case {authenticated: creds}:
Service.respond_with(<>Unimplemented...</>)
tweet = TW.post_status(content, "", creds)
Service.respond_with(<>Tweeted: <em>«{tweet.text}»</></>)
default:
authenticate()
}
Expand All @@ -106,7 +107,7 @@ Please re-run your application with: --twitter-config option")
id: "twitter",
description: "Managing Twitter account",
cmds: [
{ cmd: "tweet [content]", description: "Publishes a given tween" }
{ cmd: "tweet [content]", description: "Publishes a given tweet" }
],
},
function parse_cmd(state) {
Expand Down

0 comments on commit 1384246

Please sign in to comment.