Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove twitter functionalities.

  • Loading branch information...
commit a969b940990d9503729a14c234ba401239e54632 1 parent 5110cf8
Romain Beauxis toots authored
Showing with 0 additions and 49 deletions.
  1. +0 −49 src/commands.coffee
49 src/commands.coffee
View
@@ -97,55 +97,6 @@ program.commands["Delete radio"] = ->
console.log "Radio successfully deleted!"
updateUser()
-program.commands["Add twitter to radio"] = ->
- program.prompt "Token: ", (token) ->
- radio = _.find program.user.radios, (radio) -> radio.token == token
-
- if not radio?
- console.error "No such radio!"
- return program.events.emit "ready"
-
- query "auth-twitter", token, "confirm-twitter", (callback) ->
- console.log "In order to authenticate a twitter account for radio: #{radio.name}"
- console.log "You need to visit that URL:"
- console.log " #{callback.url}"
- console.log ""
- console.log "There you should take note of the PIN that will be displayed"
- console.log "and report it here."
- console.log ""
- program.prompt "PIN? ", (verifier) ->
-
- query callback.token, verifier, "authenticated-twitter", (name) ->
- console.log "Authenticated twitter account: #{name} for radio: #{radio.name}!"
- updateUser()
-
-program.commands["Remove twitter from radio"] = ->
- program.prompt "Token: ", (token) ->
- radio = _.find program.user.radios, (radio) -> radio.token == token
-
- if not radio?
- console.error "No such radio!"
- return program.events.emit "ready"
-
- program.prompt "Twitter screen name: ", (name) ->
- ok = _.any radio.twitters, (twitter) -> twitter == name
- unless ok
- console.error "This account is not authenticated for radio: #{radio.name}!"
- return program.events.emit "ready"
-
- args =
- token : radio.token
- name : name
-
- query "delete-twitter", args, "deleted-twitter", ->
- console.log ""
- console.log "Twitter account #{name} successfully un-registered for radio: #{radio.name}!"
- console.log ""
- console.log "This account shall not be used by SavonetFlows anymore. However, SavonetFlows"
- console.log "remains authorized for this account. Please visit the account profile to remove"
- console.log "it."
- updateUser()
-
program.commands["Exit"] = ->
console.log "Bye!"
process.exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.