Closed netromdk closed 6 years ago
Had an idea: By checking a token with auth.test
it returns a response like this:
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - URL: https://SPACE.slack.com/
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - Workspace: SPACE
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - Workspace ID: SPACE_ID
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - User: USER
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - User ID: USER_ID
So why don't we change it so that adding a new workspace only requires inputting a token, then we simply grab the name of the workspace on successful authentication instead. Small thing but I like to make things simple as can be.
Depends on #67 to be merged first so master can be rebased onto this one.
Fixes #64.
Changes proposed in this pull request:
create_logger
that respects quiet mode if definedverify_token
utility functionverify_token
workspace_prompt
function used in--init
andWorkspaceCommand
--create
and--remove
workspaces via command